You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.7 KiB
68 lines
2.7 KiB
package com.fr.design.mainframe.theme; |
|
|
|
import com.fr.base.theme.ReportTheme; |
|
import com.fr.base.theme.TemplateThemeConfig; |
|
import com.fr.design.ExtraDesignClassManager; |
|
import com.fr.design.i18n.Toolkit; |
|
import com.fr.design.mainframe.theme.edit.ReportBodyStyleEditPane; |
|
import com.fr.design.mainframe.theme.processor.ThemePreviewPaneProcessor; |
|
import com.fr.widgettheme.theme.panel.WidgetDisplayReportThemePreviewPane; |
|
|
|
/** |
|
* @author Starryi |
|
* @version 1.0 |
|
* Created by Starryi on 2021/8/13 |
|
*/ |
|
public class ReportThemeProfilePane extends TemplateThemeProfilePane<ReportTheme> { |
|
private ReportBodyStyleEditPane reportBodyStyleSettingPane; |
|
|
|
public ReportThemeProfilePane(TemplateThemeConfig<ReportTheme> config) { |
|
super(config); |
|
} |
|
|
|
@Override |
|
public TemplateThemePreviewPane<ReportTheme> createThemePreviewPane() { |
|
ThemePreviewPaneProcessor processor = ExtraDesignClassManager.getInstance().getSingle(ThemePreviewPaneProcessor.XML_TAG); |
|
if (processor != null) { |
|
return processor.createReportThemePreviewPane(); |
|
} |
|
//return WidgetUtils.enableWidgetEnhance() ? new StrongestControlReportThemePreviewPane() : new ReportThemePreviewPane(); |
|
return new WidgetDisplayReportThemePreviewPane(); |
|
} |
|
|
|
@Override |
|
public TemplateThemeEditorPane<ReportTheme> createThemeEditorPane() { |
|
return new ReportThemeEditorPane(config); |
|
} |
|
|
|
@Override |
|
public String title4PopupWindow() { |
|
return Toolkit.i18nText("Fine-Design_Basic_Report_Theme_Profile_Dialog_Title"); |
|
} |
|
|
|
private static class ReportThemeEditorPane extends TemplateThemeEditorPane<ReportTheme> { |
|
|
|
private final ReportBodyStyleEditPane reportBodyStyleSettingPane; |
|
|
|
public ReportThemeEditorPane(TemplateThemeConfig<ReportTheme> config) { |
|
super(config); |
|
this.reportBodyStyleSettingPane = new ReportBodyStyleEditPane(); |
|
addCustomEditorPane(Toolkit.i18nText("Fine-Design_Predefined_Template_Background"), reportBodyStyleSettingPane); |
|
addCustomEditorPane(Toolkit.i18nText("Fine-Design_Predefined_Cell_Style"), createCellStyleSettingPane()); |
|
addCustomEditorPane(Toolkit.i18nText("Fine-Design_Predefined_Chart_Style"), createChartStyleSettingPane()); |
|
refreshExtraAdvancedPane(); |
|
} |
|
|
|
@Override |
|
public void populateBean4CustomEditors(ReportTheme theme) { |
|
super.populateBean4CustomEditors(theme); |
|
reportBodyStyleSettingPane.populateBean(theme.getBodyStyle()); |
|
} |
|
|
|
@Override |
|
public void updateBean4CustomEditors(ReportTheme theme) { |
|
super.updateBean4CustomEditors(theme); |
|
theme.setBodyStyle(this.reportBodyStyleSettingPane.updateBean()); |
|
} |
|
} |
|
}
|
|
|