Browse Source

REPORT-58344 主题样式frm下的图表标题增加提示

persist/11.0
白岳 3 years ago
parent
commit
c51b337702
  1. 15
      designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java
  3. 16
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleFormEditPane.java
  4. 36
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStyleFormPane.java

15
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<FormTheme> {
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<Color> colors) {
super.onColorSchemeChanged(colors);

6
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java

@ -45,7 +45,7 @@ public class ChartStyleEditPane extends MultiTabPane<ThemedChartStyle> {
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<ThemedChartStyle> {
return paneList;
}
protected ChartTitleAndBackgroundStylePane createChartTitleAndBackgroundStylePane() {
return new ChartTitleAndBackgroundStylePane();
}
@Override
public void populateBean(ThemedChartStyle ob) {
chartSeriesStylePane.populate(ob);

16
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();
}
}

36
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("<html>" + Toolkit.i18nText("Fine-Design_Chart_Title_Background_Tooltip") + "</html>");
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};
}
}
Loading…
Cancel
Save