Browse Source

REPORT-52364 SnapChat弹窗资源路径修改与国际化

feature/10.0
kuangshuai 4 years ago
parent
commit
03fe02e702
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  2. 10
      designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java

4
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -100,6 +100,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel defaultPane; // "无可用配置项"面板 private JPanel defaultPane; // "无可用配置项"面板
private JPanel defaultAuthorityPane; // "该元素不支持权限编辑" private JPanel defaultAuthorityPane; // "该元素不支持权限编辑"
private PropertyItem selectedItem; // 当前被选中的属性配置项 private PropertyItem selectedItem; // 当前被选中的属性配置项
private SnapChat widgetLibSnapChat;
public enum PropertyMode { public enum PropertyMode {
REPORT, // 报表 REPORT, // 报表
@ -300,6 +301,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
"hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, "hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 组件库 // 组件库
widgetLibSnapChat = SnapChatFactory.createSnapChat(false, SnapChatKeys.COMPONENT);
PropertyItem widgetLib = new PropertyItem( PropertyItem widgetLib = new PropertyItem(
KEY_WIDGET_LIB, KEY_WIDGET_LIB,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Library"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Library"),
@ -529,7 +531,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
public SnapChat getWidgetLibSnapChat() { public SnapChat getWidgetLibSnapChat() {
return SnapChatFactory.createSnapChat(false, SnapChatKeys.COMPONENT); return widgetLibSnapChat;
} }
public PromptWindow getWidgetLibPromptWindow() { public PromptWindow getWidgetLibPromptWindow() {

10
designer-base/src/main/java/com/fr/design/mainframe/reuse/ReuseGuideDialog.java

@ -40,7 +40,7 @@ public class ReuseGuideDialog extends UIDialog implements PromptWindow {
JPanel backGroundPane = new JPanel() { JPanel backGroundPane = new JPanel() {
@Override @Override
protected void paintComponent(Graphics g) { protected void paintComponent(Graphics g) {
Image icon = IOUtils.readImage("com/fr/plugin/form/images/background.png");// 003.jpg是测试图片在项目的根目录下 Image icon = IOUtils.readImage("com/fr/base/images/share/background.png");// 003.jpg是测试图片在项目的根目录下
g.drawImage(icon, 0, 0, getSize().width, getSize().height, this);// 图片会自动缩放 g.drawImage(icon, 0, 0, getSize().width, getSize().height, this);// 图片会自动缩放
} }
}; };
@ -91,7 +91,7 @@ public class ReuseGuideDialog extends UIDialog implements PromptWindow {
JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JPanel northPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
//右上角关闭按钮 //右上角关闭按钮
JButton button = new JButton(new ImageIcon(IOUtils.readImage("/com/fr/plugin/form/images/close.png").getScaledInstance(15, 15, Image.SCALE_SMOOTH))); JButton button = new JButton(new ImageIcon(IOUtils.readImage("/com/fr/base/images/share/close.png").getScaledInstance(15, 15, Image.SCALE_SMOOTH)));
button.setBorder(null); button.setBorder(null);
button.setOpaque(false); button.setOpaque(false);
button.addActionListener(e -> ReuseGuideDialog.this.hideWindow()); button.addActionListener(e -> ReuseGuideDialog.this.hideWindow());
@ -105,8 +105,8 @@ public class ReuseGuideDialog extends UIDialog implements PromptWindow {
private JPanel createCenterPanel() { private JPanel createCenterPanel() {
JPanel centerPanel = new JPanel(new BorderLayout()); JPanel centerPanel = new JPanel(new BorderLayout());
UILabel titleLabel = new UILabel(Toolkit.i18nText("Fine-Plugin_Component_Drag_And_Make_Component")); UILabel titleLabel = new UILabel(Toolkit.i18nText("Fine-Design_Share_Drag_And_Make_Component"));
UILabel imageLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/plugin/form/images/guide.png").getScaledInstance(DEFAULT.width, DEFAULT.height, Image.SCALE_SMOOTH))); UILabel imageLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/base/images/share/guide.png").getScaledInstance(DEFAULT.width, DEFAULT.height, Image.SCALE_SMOOTH)));
titleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, TITLE_FONT_SIZE)); titleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, TITLE_FONT_SIZE));
titleLabel.setBorder(BorderFactory.createEmptyBorder()); titleLabel.setBorder(BorderFactory.createEmptyBorder());
@ -124,7 +124,7 @@ public class ReuseGuideDialog extends UIDialog implements PromptWindow {
private JPanel createSouthPanel() { private JPanel createSouthPanel() {
JPanel southPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel southPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
JButton button = new JButton(Toolkit.i18nText("Fine-Plugin_Component_Try_Drag")) { JButton button = new JButton(Toolkit.i18nText("Fine-Design_Share_Try_Drag")) {
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {
ColorBackground buttonBackground = ColorBackground.getInstance(Color.decode("#419BF9")); ColorBackground buttonBackground = ColorBackground.getInstance(Color.decode("#419BF9"));

Loading…
Cancel
Save