|
|
|
@ -22,6 +22,7 @@ import com.fr.design.menu.ToolBarDef;
|
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.third.javax.annotation.Nullable; |
|
|
|
|
import com.fr.transaction.CallBackAdaptor; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
@ -67,19 +68,19 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
|
|
|
|
|
|
|
|
|
|
private final Window window; |
|
|
|
|
|
|
|
|
|
public static TemplateThemeGridControlPane<FormTheme> createFormThemesManagerPane(Window window) { |
|
|
|
|
public static TemplateThemeGridControlPane<FormTheme> createFormThemesManagerPane(@Nullable Window window) { |
|
|
|
|
FormThemeConfig config = FormThemeConfig.getInstance(); |
|
|
|
|
FormThemeProfilePane editPane = new FormThemeProfilePane(config); |
|
|
|
|
return new TemplateThemeGridControlPane<>(window, config, editPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static TemplateThemeGridControlPane<ReportTheme> createReportThemesManagerPane(Window window) { |
|
|
|
|
public static TemplateThemeGridControlPane<ReportTheme> createReportThemesManagerPane(@Nullable Window window) { |
|
|
|
|
ReportThemeConfig config = ReportThemeConfig.getInstance(); |
|
|
|
|
ReportThemeProfilePane editPane = new ReportThemeProfilePane(config); |
|
|
|
|
return new TemplateThemeGridControlPane<>(window, config, editPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public TemplateThemeGridControlPane(Window window, TemplateThemeConfig<T> config, TemplateThemeProfilePane<T> profilePane) { |
|
|
|
|
public TemplateThemeGridControlPane(@Nullable Window window, TemplateThemeConfig<T> config, TemplateThemeProfilePane<T> profilePane) { |
|
|
|
|
this.window = window; |
|
|
|
|
this.config = config; |
|
|
|
|
this.profilePane = profilePane; |
|
|
|
@ -124,13 +125,15 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void registerWindowListener() { |
|
|
|
|
window.addWindowListener(new WindowAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void windowClosed(WindowEvent e) { |
|
|
|
|
super.windowClosed(e); |
|
|
|
|
asyncThemeFetcher.shutdown(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (window != null) { |
|
|
|
|
window.addWindowListener(new WindowAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void windowClosed(WindowEvent e) { |
|
|
|
|
super.windowClosed(e); |
|
|
|
|
asyncThemeFetcher.shutdown(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void resetEnableRemoveAction(T selectedTheme, RemoveThemeAction removeAction) { |
|
|
|
|