From fd9b53296cfa60260bb449b42a9dcd0f5e3d906f Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 26 Aug 2021 13:38:36 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-58119=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E4=B8=BB=E9=A2=98=E9=87=8C=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E9=87=8D=E5=90=8D=E7=9A=84=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E9=87=8C=E8=BF=98=E6=98=AF=E6=8F=90=E7=A4=BA=E7=9A=84=E9=A2=84?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 1. 修改控件使用的原预定义样式优化遗留的国际化key 2. 修改主题相关国际化key不规范的问题 【改动思路】 同上 --- .../mainframe/theme/FormThemeProfilePane.java | 2 +- .../theme/ReportThemeProfilePane.java | 2 +- .../theme/TemplateThemeManagePane.java | 10 +++---- .../theme/TemplateThemeProfilePane.java | 28 +++++++++---------- .../dialog/TemplateThemeManageDialog.java | 8 +++--- .../dialog/TemplateThemeUsingDialog.java | 10 +++---- .../theme/edit/CellStyleListEditPane.java | 4 +-- .../theme/edit/ComponentStyleEditPane.java | 8 +++--- .../server/TemplateThemeManagerAction.java | 2 +- .../cell/settingpane/style/StylePane.java | 4 +-- 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java index 8f3e3171f..ef35f7e02 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java @@ -91,6 +91,6 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane { @Override public String title4PopupWindow() { - return Toolkit.i18nText("Fine-Design_Form_Theme_Profile_Dialog_Title"); + return Toolkit.i18nText("Fine-Design_Basic_Form_Theme_Profile_Dialog_Title"); } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java index 437302943..091262b58 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java @@ -69,6 +69,6 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane extends BasicPane this.profilePane = profilePane; this.themeListPane = new TemplateThemeListPane<>(true, config, profilePane); this.removeAction = new RemoveThemeAction(false); - this.setTheme4NewTemplateButton = new UIButton(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Pane_Default_Setting")); + this.setTheme4NewTemplateButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Pane_Default_Setting")); this.asyncThemeFetcher = new AsyncThemeFetcher<>(1, config); initializePane(); @@ -191,15 +191,15 @@ public class TemplateThemeManagePane extends BasicPane MenuDef menuDef = new MenuDef(Toolkit.i18nText("Fine-Design_Basic_Action_Add")); menuDef.setIconPath(IconPathConstants.ADD_POPMENU_ICON_PATH); menuDef.setRePaint(true); - menuDef.addShortCut(new AddThemeAction(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Pane_Create_Light_Theme"), config.getLightThemeName4New())); - menuDef.addShortCut(new AddThemeAction(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Pane_Create_Dark_Theme"), config.getDarkThemeName4New())); + menuDef.addShortCut(new AddThemeAction(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Pane_Create_Light_Theme"), config.getLightThemeName4New())); + menuDef.addShortCut(new AddThemeAction(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Pane_Create_Dark_Theme"), config.getDarkThemeName4New())); return menuDef; } @Override protected String title4PopupWindow() { - return Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_Title"); + return Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title"); } private class RemoveThemeAction extends UpdateAction { @@ -218,7 +218,7 @@ public class TemplateThemeManagePane extends BasicPane return; } int result = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(TemplateThemeManagePane.this), - Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Pane_Delete_Tip", theme.getName()), + Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Pane_Delete_Tip", theme.getName()), Toolkit.i18nText("Fine-Design_Basic_Delete"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (result == JOptionPane.YES_OPTION) { Configurations.modify(new WorkerFacade(config.getClass()) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index 18ccb9a02..79053f357 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -123,13 +123,13 @@ public abstract class TemplateThemeProfilePane extends @Override public String title4PopupWindow() { - return Toolkit.i18nText("Fine-Design_Template_Theme_Profile_Dialog_Title"); + return Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Dialog_Title"); } private JPanel createLeftPane() { JPanel titleContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); titleContainer.setPreferredSize(new Dimension(LEFT_TITLE_PANE_WIDTH, LEFT_TITLE_PANE_HEIGHT)); - titleContainer.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Template_Theme_Preview_Pane_Title"), TITLE_BORDER_FONT)); + titleContainer.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Preview_Pane_Title"), TITLE_BORDER_FONT)); JPanel previewContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); previewContainer.setBorder(BorderFactory.createEmptyBorder(5, 4, 10, 4)); @@ -167,7 +167,7 @@ public abstract class TemplateThemeProfilePane extends private JPanel createNameEditPane() { JPanel container = new JPanel(new BorderLayout(30, 0)); container.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0)); - container.add(LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Name")), BorderLayout.WEST); + container.add(LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Name")), BorderLayout.WEST); JPanel settingContainer = new JPanel(new BorderLayout(10, 0)); container.add(settingContainer, BorderLayout.CENTER); @@ -236,11 +236,11 @@ public abstract class TemplateThemeProfilePane extends double[] columnSize = {p, p}; JPanel previewLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - previewLabelPane.add(LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Color_Scheme_Preview_Label")), BorderLayout.NORTH); + previewLabelPane.add(LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Preview_Label")), BorderLayout.NORTH); JPanel content = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{ - {LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Color_Scheme_Edit_Label")), colorListPane}, - {null, LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Color_Scheme_Edit_Tip"), new Color(0XC6C6C6), 10)}, + {LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Edit_Label")), colorListPane}, + {null, LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Edit_Tip"), new Color(0XC6C6C6), 10)}, {previewLabelPane, extendedContainer}, }, rowSize, columnSize, 18, 7); @@ -248,7 +248,7 @@ public abstract class TemplateThemeProfilePane extends JPanel borderContainer = new JPanel(new BorderLayout()); borderContainer.setPreferredSize(new Dimension(COLOR_SCHEME_TITLE_PANE_WIDTH, COLOR_SCHEME_TITLE_PANE_HEIGHT)); - borderContainer.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Color_Scheme_Title"))); + borderContainer.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Color_Scheme_Title"))); borderContainer.add(content); JPanel container = new JPanel(new BorderLayout()); @@ -266,7 +266,7 @@ public abstract class TemplateThemeProfilePane extends } protected JPanel createCustomEditorsPane() { JPanel container = new JPanel(new BorderLayout()); - container.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Custom_Settings_Title"))); + container.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Custom_Settings_Title"))); uiTabbedPane = new UITabbedPane(); uiTabbedPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 1)); @@ -375,7 +375,7 @@ public abstract class TemplateThemeProfilePane extends public UIButton createSaveButton() { saveButton = new UIButton(); - saveButton.setText(Toolkit.i18nText("Fine-Design_Basic_Save")); + saveButton.setText(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save")); saveButton.setEnabled(false); saveButton.addActionListener(new ActionListener() { @Override @@ -406,7 +406,7 @@ public abstract class TemplateThemeProfilePane extends public UIButton createSaveAsButton(final TemplateThemeProfileDialog profileDialog) { saveAsButton = new UIButton(); saveAsButton.removeAll(); - saveAsButton.setText(Toolkit.i18nText("Fine-Design_Basic_Predefined_Save_As_New")); + saveAsButton.setText(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_As")); saveAsButton.setEnabled(false); saveAsButton.addActionListener(new ActionListener() { @Override @@ -426,7 +426,7 @@ public abstract class TemplateThemeProfilePane extends public SaveAsDialog(TemplateThemeProfileDialog dialog) { super(dialog, ModalityType.APPLICATION_MODAL); - setTitle(Toolkit.i18nText("Fine-Design_Template_Theme_Save_As_Dialog_Title")); + setTitle(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Save_As_Dialog_Title")); setResizable(false); setSize(new Dimension(300, 140)); GUICoreUtils.centerWindow(this); @@ -518,7 +518,7 @@ public abstract class TemplateThemeProfilePane extends JPanel nameTextPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(20, 5); nameTextPane.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0)); - nameTextPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Template_Theme_Save_As_Pane_Name_Label"))); + nameTextPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Save_As_Pane_Name_Label"))); nameTextPane.add(nameTextField); container.add(nameTextPane, BorderLayout.CENTER); @@ -572,9 +572,9 @@ public abstract class TemplateThemeProfilePane extends String error = StringUtils.EMPTY; String name = textField.getText(); if (isThemeNameEmpty(name)) { - error = Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Empty_Name_Error_Tip"); + error = Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Empty_Name_Error_Tip"); } else if (checkDuplicated && isThemeNameDuplicated(name)) { - error = Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Duplicated_Name_Error_Tip"); + error = Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Duplicated_Name_Error_Tip"); } errorLabel.setText(error); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeManageDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeManageDialog.java index 3eeee55fe..e7acb8d8a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeManageDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeManageDialog.java @@ -31,14 +31,14 @@ public class TemplateThemeManageDialog extends TemplateThemeDialog { private final TemplateThemeManageDialogContentPane contentPane; public TemplateThemeManageDialog(Window parent) { - super(parent, Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_Title"), CONTENT_WIDTH, CONTENT_HEIGHT); + super(parent, Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title"), CONTENT_WIDTH, CONTENT_HEIGHT); contentPane = new TemplateThemeManageDialogContentPane(); setContentPane(createDialogContentPane(contentPane, new UIButton[]{ createCompleteButton() })); } private UIButton createCompleteButton() { - UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_Complete")); + UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Complete")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -70,8 +70,8 @@ public class TemplateThemeManageDialog extends TemplateThemeDialog { reportThemesManagerPane = TemplateThemeManagePane.createReportThemesManagerPane(); reportThemesManagerPane.startListenThemeConfig(); - tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_FORM_TAB"), formThemesManagerPane); - tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_REPORT_TAB"), reportThemesManagerPane); + tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_FORM_TAB"), formThemesManagerPane); + tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_REPORT_TAB"), reportThemesManagerPane); tabbedPane.setSelectedIndex(0); JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java index 24406c91f..adf25b88a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java @@ -34,7 +34,7 @@ public class TemplateThemeUsingDialog extends TemplateT private final ThemedTemplate currentTemplate; public TemplateThemeUsingDialog(Window parent, ThemedTemplate template, TemplateThemeConfig config) { - super(parent, Toolkit.i18nText("Fine-Design_Template_Theme_Using_Dialog_Title"), CONTENT_WIDTH, CONTENT_HEIGHT); + super(parent, Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Using_Dialog_Title"), CONTENT_WIDTH, CONTENT_HEIGHT); this.currentTemplate = template; this.themeListPane = new TemplateThemeListPane<>(false, config, null); @@ -97,7 +97,7 @@ public class TemplateThemeUsingDialog extends TemplateT JPanel themeListPaneContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); themeListPaneContainer.setBorder(new CompoundBorder( - BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Template_Theme_Using_Dialog_Select"), 12), + BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Using_Dialog_Select"), 12), BorderFactory.createEmptyBorder(0, 10, 0, 10) )); themeListPaneContainer.add(themeListPane, BorderLayout.CENTER); @@ -111,7 +111,7 @@ public class TemplateThemeUsingDialog extends TemplateT // 权限编辑模式下,不显示打开主题管理对话框的按钮 return null; } - UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_Title")); + UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -123,7 +123,7 @@ public class TemplateThemeUsingDialog extends TemplateT } private UIButton createUsingCurrentThemeButton() { - UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Template_Theme_Using_Dialog_Use")); + UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Using_Dialog_Use")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -134,7 +134,7 @@ public class TemplateThemeUsingDialog extends TemplateT } private UIButton createCompleteButton() { - UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Template_Theme_Using_Dialog_Complete")); + UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Using_Dialog_Complete")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java index 29325592d..ec855962a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java @@ -66,12 +66,12 @@ public class CellStyleListEditPane extends JListControlPane { String[] allNames = nameableList.getAllNames(); allNames[index] = StringUtils.EMPTY; if (StringUtils.isEmpty(newName)) { - showTipDialogAndReset(i18nText("Fine-Design_Basic_Predefined_Style_Empty_Name"), index); + showTipDialogAndReset(i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Cell_Style_Empty_Name_Tip"), index); nameableList.setNameAt(oldName, index); return; } if (isNameRepeated(new List[]{Arrays.asList(allNames)}, newName)) { - showTipDialogAndReset(i18nText("Fine-Design_Basic_Predefined_Style_Duplicate_Name", newName), index); + showTipDialogAndReset(i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Cell_Style_Duplicated_Name_Tip", newName), index); nameableList.setNameAt(oldName, index); return; } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java index e4182ea50..bb78d2fc0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java @@ -43,9 +43,9 @@ public class ComponentStyleEditPane extends JPanel { JPanel content = new TabbedPane( new String[] { - Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Component_Title"), - Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Component_Body"), - Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Component_Background") + Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Component_Title"), + Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Component_Body"), + Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Component_Background") }, new JComponent[] { createTabContainer(componentTitleStylePane), createTabContainer(componentBodyStylePane), createTabContainer(componentIntegralStylePane) } ); @@ -119,7 +119,7 @@ public class ComponentStyleEditPane extends JPanel { JPanel tipLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); tipLabelPane.setBorder(BorderFactory.createEmptyBorder(3, 0, 0, 0)); - UILabel tipLabel = LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Template_Theme_Edit_Pane_Component_Style_Tip"), new Color(0XC6C6C6), 10); + UILabel tipLabel = LabelUtils.createLabel(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Component_Style_Tip"), new Color(0XC6C6C6), 10); tipLabelPane.add(tipLabel); container.add(tipLabelPane, BorderLayout.NORTH); diff --git a/designer-realize/src/main/java/com/fr/design/actions/server/TemplateThemeManagerAction.java b/designer-realize/src/main/java/com/fr/design/actions/server/TemplateThemeManagerAction.java index ad4dbff68..f5ed772b0 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/server/TemplateThemeManagerAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/server/TemplateThemeManagerAction.java @@ -42,7 +42,7 @@ public class TemplateThemeManagerAction extends SnapChatUpdateAction { @Override public String getMenuName() { - return Toolkit.i18nText("Fine-Design_Template_Theme_Manager_Dialog_Title"); + return Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title"); } @Override diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java index ced3495dc..59bc73d57 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java @@ -88,7 +88,7 @@ public class StylePane extends BasicPane { } }); - UILabel uiLabel = new UILabel("样式设置"); + UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Style_Setting")); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; @@ -121,7 +121,7 @@ public class StylePane extends BasicPane { private JPanel createThemedStylePane() { JPanel container = new JPanel(new BorderLayout(0, IntervalConstants.INTERVAL_L1)); - UILabel uiLabel = new UILabel("样式选择"); + UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Design_Style_Selecting")); uiLabel.setPreferredSize(new Dimension(uiLabel.getPreferredSize().width, 20)); container.add(uiLabel, BorderLayout.NORTH); themedCellStyleListPane.setBorder(BorderFactory.createEmptyBorder()); From ae475ed1616658b199842defd0f9518606c75578 Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 26 Aug 2021 14:01:45 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-58123=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91frm=E6=A8=A1=E6=9D=BF=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=89=93=E5=BC=80=EF=BC=8C=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=88=87=E6=8D=A2=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=EF=BC=8C=E9=9C=80=E8=A6=81=E7=82=B9=E4=B8=A4=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 当用户在跟随主题与自定义之间切换时,样式配置项面板LayoutStylePane中 的部分配置项的可见性会发生变化,需要通知到FollowingThemePane重新测量位置 及尺寸 【改动思路】 同上 --- .../main/java/com/fr/design/gui/style/FollowingThemePane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java b/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java index 9a4c4181c..c7c1da0ef 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java @@ -57,6 +57,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver { for (FollowingThemeActionChangeListener changeListener : changeListeners) { changeListener.onFollowingTheme(isFollowingTheme()); } + invalidate(); // 与主题相关的属性面板更新完毕后,再通知外层更新数据 if (uiObserverListener != null) { From 5b4553eabfb63194cf0eb4c7ca4802e783f7791e Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 26 Aug 2021 14:21:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-58009=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E8=BF=9C=E7=A8=8B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=BB=E9=A2=98=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=B8=BB=E9=A2=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E6=B2=A1=E6=9C=89=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 链接至远程工作目录且无权限时,屏蔽主题管理对话框入口 【改动思路】 同上 --- .../dialog/TemplateThemeUsingDialog.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java index adf25b88a..1d17bb4eb 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java @@ -12,6 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.theme.TemplateThemeListPane; import com.fr.design.mainframe.theme.ui.BorderUtils; import com.fr.stable.StringUtils; +import com.fr.workspace.WorkContext; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -26,7 +27,8 @@ import java.awt.event.ActionListener; * @version 1.0 * Created by Starryi on 2021/8/13 */ -public class TemplateThemeUsingDialog extends TemplateThemeDialog { +public class +TemplateThemeUsingDialog extends TemplateThemeDialog { public static final int CONTENT_WIDTH = 660; public static final int CONTENT_HEIGHT = 515; @@ -107,19 +109,18 @@ public class TemplateThemeUsingDialog extends TemplateT } private UIButton createOpenThemeManagerButton() { - if (DesignModeContext.isAuthorityEditing()) { - // 权限编辑模式下,不显示打开主题管理对话框的按钮 - return null; + if (WorkContext.getCurrent().isRoot()) { + UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title")); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + TemplateThemeManageDialog dialog = new TemplateThemeManageDialog(TemplateThemeUsingDialog.this); + dialog.setVisible(true); + } + }); + return button; } - UIButton button = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Title")); - button.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - TemplateThemeManageDialog dialog = new TemplateThemeManageDialog(TemplateThemeUsingDialog.this); - dialog.setVisible(true); - } - }); - return button; + return null; } private UIButton createUsingCurrentThemeButton() { From 37425f9751b8606621c42b26ca9560e402532e16 Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 26 Aug 2021 15:49:46 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-58038=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E6=A8=A1=E6=9D=BF=E6=89=93=E5=BC=80?= =?UTF-8?q?=EF=BC=8C=E6=A8=A1=E6=9D=BF=E5=BA=94=E7=94=A8=E7=9A=84=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9=E5=90=8E=EF=BC=8C=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=9C=89=E4=B8=80=E4=B8=AA=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=9A=84=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 优化下主题修改后表单布局编辑界面的更新逻辑,没必要重建右侧属性面板 【改动思路】 同上 --- .../src/main/java/com/fr/design/mainframe/JForm.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 60463b312..f3fbc8cc8 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -1190,10 +1190,12 @@ public class JForm extends JTemplate implements BaseJForm Date: Thu, 26 Aug 2021 17:07:21 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-58073=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E7=BB=86=E8=8A=82=E5=AE=9A=E5=88=B6?= =?UTF-8?q?-FRM=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F-=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=90=8E=E7=82=B9=E5=87=BB=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E6=9C=AA=E8=81=94=E5=8A=A8=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 刷新时在XWTitleLayout中重置标题样式 【改动思路】 同上 --- .../com/fr/design/designer/creator/XWTitleLayout.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java index 71129bed4..ed59fa9ee 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java @@ -219,17 +219,26 @@ public class XWTitleLayout extends DedicateLayoutContainer { public void convert() { isRefreshing = true; WTitleLayout layout = this.toData(); + XBorderStyleWidgetCreator bodyCreator = null; this.removeAll(); for (int i = 0, num = layout.getWidgetCount(); i < num; i++) { BoundsWidget bw = (BoundsWidget) layout.getWidget(i); if (bw != null) { Rectangle bounds = bw.getBounds(); XWidgetCreator comp = (XWidgetCreator) XCreatorUtils.createXCreator(bw.getWidget()); - String constraint = bw.getWidget().acceptType(Label.class) ? WTitleLayout.TITLE : WTitleLayout.BODY; + boolean isTitleWidget = bw.getWidget().acceptType(Label.class); + String constraint = isTitleWidget ? WTitleLayout.TITLE : WTitleLayout.BODY; this.add(comp, constraint); comp.setBounds(bounds); + if (!isTitleWidget && comp instanceof XBorderStyleWidgetCreator) { + bodyCreator = (XBorderStyleWidgetCreator) comp; + } } } + // 刷新时重置下样式 + if (bodyCreator != null) { + bodyCreator.initStyle(); + } isRefreshing = false; }