From fd4b15f8f992f1ea72db2ccacdf3d290aa5d8d2f Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 20 Oct 2021 11:52:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-61055=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E3=80=91=E4=B8=BB=E9=A2=98=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=87=A0=E4=B8=AA=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 主题编辑面板开放交互接口,便于与插件中的导出按钮交互 【改动思路】 同上 --- .../mainframe/theme/TemplateThemeProfilePane.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 4fc65badb..bc787bb18 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 @@ -141,6 +141,7 @@ public abstract class TemplateThemeProfilePane extends if (saveAsButton != null) { saveAsButton.setEnabled(StringUtils.isNotEmpty(name)); } + actionListener.onInitialize(theme); isPopulating = false; } @@ -218,6 +219,7 @@ public abstract class TemplateThemeProfilePane extends super.afterCommit(); saveButton.setEnabled(false); saveAsButton.setEnabled(true); + actionListener.onSaved(config.cachedFetch(getName())); DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully")); } }); @@ -342,11 +344,21 @@ public abstract class TemplateThemeProfilePane extends } public interface TemplateThemeProfileActionListener { + void onInitialize(TemplateTheme theme); + void onThemeNameChecked(String name, boolean valid); + + void onSaved(TemplateTheme theme); } public static class TemplateThemeProfileActionAdapter implements TemplateThemeProfileActionListener { + @Override + public void onInitialize(TemplateTheme theme) {} + @Override public void onThemeNameChecked(String name, boolean valid) { } + + @Override + public void onSaved(TemplateTheme theme) {} } } \ No newline at end of file