|
|
@ -141,6 +141,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends |
|
|
|
if (saveAsButton != null) { |
|
|
|
if (saveAsButton != null) { |
|
|
|
saveAsButton.setEnabled(StringUtils.isNotEmpty(name)); |
|
|
|
saveAsButton.setEnabled(StringUtils.isNotEmpty(name)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
actionListener.onInitialize(theme); |
|
|
|
|
|
|
|
|
|
|
|
isPopulating = false; |
|
|
|
isPopulating = false; |
|
|
|
} |
|
|
|
} |
|
|
@ -218,6 +219,7 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends |
|
|
|
super.afterCommit(); |
|
|
|
super.afterCommit(); |
|
|
|
saveButton.setEnabled(false); |
|
|
|
saveButton.setEnabled(false); |
|
|
|
saveAsButton.setEnabled(true); |
|
|
|
saveAsButton.setEnabled(true); |
|
|
|
|
|
|
|
actionListener.onSaved(config.cachedFetch(getName())); |
|
|
|
DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully")); |
|
|
|
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 { |
|
|
|
public interface TemplateThemeProfileActionListener { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void onInitialize(TemplateTheme theme); |
|
|
|
|
|
|
|
|
|
|
|
void onThemeNameChecked(String name, boolean valid); |
|
|
|
void onThemeNameChecked(String name, boolean valid); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void onSaved(TemplateTheme theme); |
|
|
|
} |
|
|
|
} |
|
|
|
public static class TemplateThemeProfileActionAdapter implements TemplateThemeProfileActionListener { |
|
|
|
public static class TemplateThemeProfileActionAdapter implements TemplateThemeProfileActionListener { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void onInitialize(TemplateTheme theme) {} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onThemeNameChecked(String name, boolean valid) { } |
|
|
|
public void onThemeNameChecked(String name, boolean valid) { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void onSaved(TemplateTheme theme) {} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |