diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java index ef35f7e02..83179edda 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java @@ -1,19 +1,20 @@ package com.fr.design.mainframe.theme; import com.fr.base.theme.FineColorManager; -import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.FormTheme; +import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.settings.ThemedComponentStyle; import com.fr.base.theme.settings.ThemedFormBodyStyle; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.theme.edit.ChartStyleFormEditPane; import com.fr.design.mainframe.theme.edit.ComponentStyleEditPane; import com.fr.design.mainframe.theme.edit.FormBodyStyleEditPane; import com.fr.design.mainframe.theme.preview.FormThemePreviewPane; import javax.swing.JPanel; - -import java.awt.Color; import java.util.List; +import java.awt.Color; import static com.fr.design.i18n.Toolkit.i18nText; @@ -52,6 +53,14 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane { return container; } + @Override + protected JPanel createChartStyleSettingPane() { + JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane(); + chartStyleSettingPane = new ChartStyleFormEditPane(); + container.add(chartStyleSettingPane); + return container; + } + @Override public void onColorSchemeChanged(List colors) { super.onColorSchemeChanged(colors); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java index 75664912c..3830f02f1 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java @@ -45,7 +45,7 @@ public class ChartStyleEditPane extends MultiTabPane { this.chartLabelPane = new ChartLabelStylePane(); this.chartAxisStylePane = new ChartAxisStylePane(); this.chartDataSheetStylePane = new ChartDataSheetStylePane(); - this.chartTitleAndBackgroundStylePane = new ChartTitleAndBackgroundStylePane(); + this.chartTitleAndBackgroundStylePane = createChartTitleAndBackgroundStylePane(); paneList = new ArrayList<>(); paneList.add(this.chartSeriesStylePane); paneList.add(this.chartLegendStylePane); @@ -56,6 +56,10 @@ public class ChartStyleEditPane extends MultiTabPane { return paneList; } + protected ChartTitleAndBackgroundStylePane createChartTitleAndBackgroundStylePane() { + return new ChartTitleAndBackgroundStylePane(); + } + @Override public void populateBean(ThemedChartStyle ob) { chartSeriesStylePane.populate(ob); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleFormEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleFormEditPane.java new file mode 100644 index 000000000..f0886804d --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleFormEditPane.java @@ -0,0 +1,16 @@ +package com.fr.design.mainframe.theme.edit; + +import com.fr.design.mainframe.theme.edit.chart.ChartTitleAndBackgroundStyleFormPane; +import com.fr.design.mainframe.theme.edit.chart.ChartTitleAndBackgroundStylePane; + +/** + * @author Bjorn + * @version 10.0 + * Created by Bjorn on 2021-08-30 + */ +public class ChartStyleFormEditPane extends ChartStyleEditPane { + + protected ChartTitleAndBackgroundStylePane createChartTitleAndBackgroundStylePane() { + return new ChartTitleAndBackgroundStyleFormPane(); + } +} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStyleFormPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStyleFormPane.java new file mode 100644 index 000000000..204bde076 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStyleFormPane.java @@ -0,0 +1,36 @@ +package com.fr.design.mainframe.theme.edit.chart; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; + +import java.awt.Color; +import java.awt.Component; + +/** + * @author Bjorn + * @version 10.0 + * Created by Bjorn on 2021-08-30 + */ +public class ChartTitleAndBackgroundStyleFormPane extends ChartTitleAndBackgroundStylePane { + + private UILabel tooltipLabel; + + protected void initComponents() { + super.initComponents(); + tooltipLabel = new UILabel("" + Toolkit.i18nText("Fine-Design_Chart_Title_Background_Tooltip") + ""); + tooltipLabel.setForeground(new Color(153, 153, 153)); + } + + protected Component[][] getComponent() { + Component[][] component = super.getComponent(); + Component[][] newComponent = new Component[component.length + 2][]; + System.arraycopy(component, 0, newComponent, 2, component.length); + newComponent[0] = new Component[]{null, null}; + newComponent[1] = new Component[]{tooltipLabel, null}; + return newComponent; + } + + protected double[] getRows(double p) { + return new double[]{p, p, p, p, p, p, p}; + } +} \ No newline at end of file