diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java index c2e28332d3..e924080ef6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java @@ -267,6 +267,10 @@ public abstract class TemplateThemeEditorPane extends J return nameTextField.checkValid(); } + public String getThemeName() { + return nameTextField.getText(); + } + public List getCurrentColorScheme() { return colorListPane.update(); } 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 f3187acaab..4fc65badbd 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 @@ -60,6 +60,8 @@ public abstract class TemplateThemeProfilePane extends private UIButton saveButton = new UIButton(); private UIButton saveAsButton = new UIButton(); + private TemplateThemeProfileActionListener actionListener = new TemplateThemeProfileActionAdapter(); + public TemplateThemeProfilePane(TemplateThemeConfig config) { super(); this.config = config; @@ -112,6 +114,7 @@ public abstract class TemplateThemeProfilePane extends return; } saveButton.setEnabled(valid && isMutable); + actionListener.onThemeNameChecked(themeEditorPane.getThemeName(), valid); } }); @@ -138,6 +141,7 @@ public abstract class TemplateThemeProfilePane extends if (saveAsButton != null) { saveAsButton.setEnabled(StringUtils.isNotEmpty(name)); } + isPopulating = false; } @@ -330,4 +334,19 @@ public abstract class TemplateThemeProfilePane extends this.dispose(); } } + + public void addProfileActionListener(TemplateThemeProfileActionListener actionListener) { + if (actionListener != null) { + this.actionListener = actionListener; + } + } + public interface TemplateThemeProfileActionListener { + + void onThemeNameChecked(String name, boolean valid); + } + public static class TemplateThemeProfileActionAdapter implements TemplateThemeProfileActionListener { + + @Override + public void onThemeNameChecked(String name, boolean valid) { } + } } \ No newline at end of file diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java index 736377f06e..84083b4048 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java @@ -162,7 +162,7 @@ public class OnlineWidgetPopupPreviewPane extends AbstractWidgetPopupPreviewPane String themeName = widget.getThemeName(); if (StringUtils.isNotEmpty(themeName)) { suitableThemeNamePane.setVisible(true); - suitableThemeNameLabel.setText(themeName); + suitableThemeNameLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share_Suitable_Theme_Prefix") + themeName); } else { suitableThemeNamePane.setVisible(false); }