Browse Source

REPORT-61055 【主题获取】主题导出插件几个小问题

【问题原因】
主题编辑面板开放交互接口,便于与插件中的导出按钮交互

【改动思路】
同上
bugfix/11.0
Starryi 3 years ago
parent
commit
fd4b15f8f9
  1. 12
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

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

@ -141,6 +141,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
if (saveAsButton != null) {
saveAsButton.setEnabled(StringUtils.isNotEmpty(name));
}
actionListener.onInitialize(theme);
isPopulating = false;
}
@ -218,6 +219,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> 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<T extends TemplateTheme> 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) {}
}
}
Loading…
Cancel
Save