From c6d0f89d021d22cd3e7352857091f992fa8b77bc Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 14 Oct 2020 14:34:58 +0800 Subject: [PATCH] =?UTF-8?q?CHART-16188=20=E6=9F=B1=E5=BD=A2=E5=9B=BE?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E4=B8=AD=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=96=B9=E5=90=91button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../column/VanChartColumnConditionPane.java | 2 +- .../VanChartColumnLabelConditionPane.java | 17 +++++++++++++ .../VanChartColumnPlotLabelNoCheckPane.java | 25 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java index c4184f3b1..3f9978f75 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnConditionPane.java @@ -49,7 +49,7 @@ public class VanChartColumnConditionPane extends DataSeriesConditionPane{ classPaneMap.put(AttrBackground.class, new VanChartColumnSeriesColorConditionPane(this)); classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); classPaneMap.put(AttrBorder.class, new VanChartColumnLabelBorderPane(this)); - classPaneMap.put(AttrLabel.class, new VanChartLabelConditionPane(this, plot)); + classPaneMap.put(AttrLabel.class, new VanChartColumnLabelConditionPane(this, plot)); classPaneMap.put(AttrFloatColor.class, new VanChartFloatColorConditionPane(this)); classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this)); classPaneMap.put(AttrSeriesImageBackground.class, new VanChartSeriesImageBackgroundConditionPane(this)); diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java new file mode 100644 index 000000000..ec870a98f --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnLabelConditionPane.java @@ -0,0 +1,17 @@ +package com.fr.van.chart.column; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane; +import com.fr.van.chart.designer.style.label.VanChartPlotLabelPane; + +public class VanChartColumnLabelConditionPane extends VanChartLabelConditionPane { + + public VanChartColumnLabelConditionPane(ConditionAttributesPane conditionAttributesPane, Plot plot) { + super(conditionAttributesPane, plot); + } + + protected VanChartPlotLabelPane createLabelPane() { + return new VanChartColumnPlotLabelNoCheckPane(getPlot(),null); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java new file mode 100644 index 000000000..b08734782 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelNoCheckPane.java @@ -0,0 +1,25 @@ +package com.fr.van.chart.column; + +import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrLabel; +import com.fr.van.chart.designer.style.VanChartStylePane; + +import java.awt.BorderLayout; + +public class VanChartColumnPlotLabelNoCheckPane extends VanChartColumnPlotLabelPane { + + public VanChartColumnPlotLabelNoCheckPane(Plot plot, VanChartStylePane parent) { + super(plot, parent); + } + + protected void addComponents() { + this.setLayout(new BorderLayout()); + this.add(getLabelPane(), BorderLayout.CENTER); + } + + public void populate(AttrLabel attr) { + super.populate(attr); + getLabelShowCheckBox().setSelected(true); + getLabelPane().setVisible(true); + } +}