|
|
@ -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,6 +125,7 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void registerWindowListener() { |
|
|
|
private void registerWindowListener() { |
|
|
|
|
|
|
|
if (window != null) { |
|
|
|
window.addWindowListener(new WindowAdapter() { |
|
|
|
window.addWindowListener(new WindowAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void windowClosed(WindowEvent e) { |
|
|
|
public void windowClosed(WindowEvent e) { |
|
|
@ -132,6 +134,7 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void resetEnableRemoveAction(T selectedTheme, RemoveThemeAction removeAction) { |
|
|
|
private void resetEnableRemoveAction(T selectedTheme, RemoveThemeAction removeAction) { |
|
|
|
if (selectedTheme == null) { |
|
|
|
if (selectedTheme == null) { |
|
|
|