From 0456e91914dbe5fa923fe8bb13a262c91c37c33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 29 Jun 2021 10:11:17 +0800 Subject: [PATCH] =?UTF-8?q?CHART-19694=20=E5=9C=B0=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=94=AF=E6=8C=81=E5=A4=9A=E7=B3=BB=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../label/VanChartMapLabelContentPane.java | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java index ce3e34ba7..680a7e4f2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java @@ -1,6 +1,9 @@ package com.fr.van.chart.map.designer.style.label; +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; import com.fr.design.ui.ModernUIPane; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; @@ -10,6 +13,7 @@ import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; import com.fr.plugin.chart.type.TextAlign; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; @@ -23,12 +27,17 @@ import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.map.designer.style.VanChartMapRichTextFieldListPane; import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by Mitisky on 16/5/20. */ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { + private UICheckBox showAllSeries; + private JPanel checkPane; + public VanChartMapLabelContentPane(VanChartStylePane parent, JPanel showOnPane, boolean inCondition) { super(parent, showOnPane, inCondition); } @@ -55,6 +64,31 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { }; } + protected JPanel getLabelContentPane(JPanel contentPane) { + showAllSeries = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_All_Series")); + + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; + double p = TableLayout.PREFERRED; + double[] row = {p, p}; + Component[][] components = { + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy")), showAllSeries} + }; + checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize); + + JPanel panel = new JPanel(new BorderLayout()); + panel.add(contentPane, BorderLayout.CENTER); + panel.add(checkPane, BorderLayout.SOUTH); + return createTableLayoutPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Content"), panel); + } + + protected void checkCardPane() { + super.checkCardPane(); + checkPane.setVisible(getContent().getSelectedIndex() == COMMON_INDEX); + } + protected String[] getRichTextFieldNames() { return new String[]{ Toolkit.i18nText("Fine-Design_Chart_Area_Name"), @@ -82,4 +116,15 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { content.setRichTextValueFormat(new AttrTooltipMapValueFormat()); return content; } + + public AttrTooltipContent updateBean() { + AttrTooltipContent attrTooltipContent = super.updateBean(); + attrTooltipContent.setShowAllSeries(showAllSeries.isSelected()); + return attrTooltipContent; + } + + public void populateBean(AttrTooltipContent attrTooltipContent) { + super.populateBean(attrTooltipContent); + showAllSeries.setSelected(attrTooltipContent.isShowAllSeries()); + } }