|
|
|
@ -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) {} |
|
|
|
|
} |
|
|
|
|
} |