Browse Source

REPORT-58119 【主题切换】主题里单元格重名的弹窗里还是提示的预定义样式

【问题原因】
1. 修改控件使用的原预定义样式优化遗留的国际化key
2. 修改主题相关国际化key不规范的问题

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
fd9b53296c
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java
  3. 10
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeManagePane.java
  4. 28
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  5. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeManageDialog.java
  6. 10
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java
  7. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java
  8. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ComponentStyleEditPane.java
  9. 2
      designer-realize/src/main/java/com/fr/design/actions/server/TemplateThemeManagerAction.java
  10. 4
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java

2
designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java

@ -91,6 +91,6 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane<FormTheme> {
@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");
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java

@ -69,6 +69,6 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane<ReportTheme
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Report_Theme_Profile_Dialog_Title");
return Toolkit.i18nText("Fine-Design_Basic_Report_Theme_Profile_Dialog_Title");
}
}

10
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeManagePane.java

@ -77,7 +77,7 @@ public class TemplateThemeManagePane<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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()) {

28
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -123,13 +123,13 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> extends
public UIButton createSaveAsButton(final TemplateThemeProfileDialog<T> 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<T extends TemplateTheme> extends
public SaveAsDialog(TemplateThemeProfileDialog<T> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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);

8
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();

10
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeUsingDialog.java

@ -34,7 +34,7 @@ public class TemplateThemeUsingDialog<T extends TemplateTheme> extends TemplateT
private final ThemedTemplate currentTemplate;
public TemplateThemeUsingDialog(Window parent, ThemedTemplate template, TemplateThemeConfig<T> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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<T extends TemplateTheme> 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) {

4
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;
}

8
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);

2
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

4
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());

Loading…
Cancel
Save