diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java index afb2671103..933ce2ad31 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java @@ -49,6 +49,7 @@ public class TemplateThemeBlock extends JPanel { private final Icon theme4currentTemplateMarkIcon = IOUtils.readIcon("/com/fr/design/form/images/theme4currentTemplate.png"); private final Icon theme4NewTemplateMarkIcon= IOUtils.readIcon("/com/fr/design/form/images/theme4newTemplate.png"); private final Icon profileIcon = IOUtils.readIcon("/com/fr/design/icon/icon_edit.png"); + private final boolean displayTheme4NewTemplateMarker; private UILabel thumbnailLabel; // UIButton会影响Block的手势监听,这里使用UILabel代替,点击事件也有Block代为处理 @@ -59,9 +60,11 @@ public class TemplateThemeBlock extends JPanel { private MouseAdapter clickListener; public TemplateThemeBlock(String name, + boolean displayTheme4NewTemplateMarker, TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { this.name = name; + this.displayTheme4NewTemplateMarker = displayTheme4NewTemplateMarker; this.config = config; this.profilePane = profilePane; @@ -192,7 +195,7 @@ public class TemplateThemeBlock extends JPanel { } } - if (StringUtils.equals(config.getThemeName4NewTemplate(), name)) { + if (displayTheme4NewTemplateMarker && StringUtils.equals(config.getThemeName4NewTemplate(), name)) { theme4NewTemplateMarkIcon.paintIcon(this, g, 0, 0); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeListPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeListPane.java index 1b6eab40a2..524c272ac9 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeListPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeListPane.java @@ -34,6 +34,7 @@ public class TemplateThemeListPane extends BasicPane { private final AsyncThemeFetcher asyncThemeFetcher; + private final boolean displayTheme4NewTemplateMarker; protected final TemplateThemeConfig config; private final TemplateThemeProfilePane profilePane; private final JPanel contentListPane; @@ -47,7 +48,8 @@ public class TemplateThemeListPane extends BasicPane { private ChangeListener changeListener; - public TemplateThemeListPane(TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { + public TemplateThemeListPane(boolean displayTheme4NewTemplateMarker, TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { + this.displayTheme4NewTemplateMarker = displayTheme4NewTemplateMarker; this.config = config; this.profilePane = profilePane; this.contentListPane = new JPanel(); @@ -95,7 +97,7 @@ public class TemplateThemeListPane extends BasicPane { } private TemplateThemeBlock createNewTemplateThemeBlock(String name) { - final TemplateThemeBlock block = new TemplateThemeBlock<>(name, config, profilePane); + final TemplateThemeBlock block = new TemplateThemeBlock<>(name, displayTheme4NewTemplateMarker, config, profilePane); block.addClickListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeManagePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeManagePane.java index 0363bd88d4..6af09ccfdc 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeManagePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeManagePane.java @@ -75,7 +75,7 @@ public class TemplateThemeManagePane extends BasicPane public TemplateThemeManagePane(TemplateThemeConfig config, TemplateThemeProfilePane profilePane) { this.config = config; this.profilePane = profilePane; - this.themeListPane = new TemplateThemeListPane<>(config, 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.asyncThemeFetcher = new AsyncThemeFetcher<>(1, config); 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 7d1a998257..24406c91f2 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 @@ -37,7 +37,7 @@ public class TemplateThemeUsingDialog extends TemplateT super(parent, Toolkit.i18nText("Fine-Design_Template_Theme_Using_Dialog_Title"), CONTENT_WIDTH, CONTENT_HEIGHT); this.currentTemplate = template; - this.themeListPane = new TemplateThemeListPane<>(config, null); + this.themeListPane = new TemplateThemeListPane<>(false, config, null); JPanel content = createContent(); UIButton openThemeManagerButton = createOpenThemeManagerButton();