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