From 1f25a4de4fe8d5d6f54bb3e9d27c40739bbe22e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 14 Jul 2020 17:37:39 +0800 Subject: [PATCH] =?UTF-8?q?CHART-14624=20=20=E8=B0=83=E6=95=B4=E9=9D=A2?= =?UTF-8?q?=E7=A7=AF=E5=9B=BE=E7=B3=BB=E5=88=97=E9=9D=A2=E6=9D=BF=E4=B8=8D?= =?UTF-8?q?=E9=80=8F=E6=98=8E=E7=9A=84enable=E5=B1=9E=E6=80=A7=E7=9A=84che?= =?UTF-8?q?ck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item/VanChartAreaFillColorConditionPane.java | 11 ++++++----- .../series/VanChartAbstractPlotSeriesPane.java | 15 +++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java index c8be9aa7a9..aeb72f07d8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java @@ -1,11 +1,11 @@ package com.fr.van.chart.designer.other.condition.item; -import com.fr.chart.base.ChartConstants; import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Plot; import com.fr.design.condition.ConditionAttributesPane; - +import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground; +import com.fr.plugin.chart.type.GradientType; import com.fr.van.chart.designer.component.VanChartAreaSeriesFillColorPane; import javax.swing.JPanel; @@ -13,7 +13,7 @@ import javax.swing.JPanel; /** * 面积图,填充色 */ -public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLineConditionPane { +public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLineConditionPane { private Plot plot; private static final long serialVersionUID = -4148284851967140012L; private VanChartAreaSeriesFillColorPane fillColorBackground; @@ -40,6 +40,7 @@ public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLine /** * 条件属性item的名称 + * * @return item的名称 */ public String nameForPopupMenuItem() { @@ -54,13 +55,13 @@ public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLine public void setDefault() { //下面这句话是给各组件一个默认值 fillColorBackground.populate(new AttrAreaSeriesFillColorBackground()); - fillColorBackground.checkoutAlpha(!(plot != null && plot.getPlotStyle() == ChartConstants.STYLE_SHADE)); + fillColorBackground.checkoutAlpha(plot != null && ((VanChartPlot) plot).getGradientStyle().getGradientType() == GradientType.NONE); } public void populate(DataSeriesCondition condition) { if (condition instanceof AttrAreaSeriesFillColorBackground) { fillColorBackground.populate((AttrAreaSeriesFillColorBackground) condition); - fillColorBackground.checkoutAlpha(!(plot != null && plot.getPlotStyle() == ChartConstants.STYLE_SHADE)); + fillColorBackground.checkoutAlpha(plot != null && ((VanChartPlot) plot).getGradientStyle().getGradientType() == GradientType.NONE); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java index 4c914b0cd2..e8f9def4b3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java @@ -5,7 +5,6 @@ import com.fr.base.chart.chartdata.model.LargeDataModel; import com.fr.base.chart.chartdata.model.NormalDataModel; import com.fr.chart.base.AttrAlpha; import com.fr.chart.base.AttrBorder; -import com.fr.chart.base.ChartConstants; import com.fr.chart.base.GradientStyle; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; @@ -90,7 +89,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP } JPanel panel = new JPanel(new BorderLayout()); JPanel colorPane = getColorPane(); - if(colorPane != null) { + if (colorPane != null) { panel.add(colorPane, BorderLayout.NORTH); } panel.add(getContentInPlotType(), BorderLayout.CENTER); @@ -279,7 +278,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP checkoutMapType(plot); - if(vanChartFillStylePane != null) { //配色 + if (vanChartFillStylePane != null) { //配色 vanChartFillStylePane.populateBean(plot.getPlotFillStyle()); } @@ -310,7 +309,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP populateCondition(plot.getConditionCollection().getDefaultAttr()); - checkAreaSeriesFillColorPane(plot.getPlotStyle()); + checkAreaSeriesFillColorPane(((VanChartPlot) plot).getGradientStyle()); checkCompsEnabledWithLarge(plot); } @@ -340,7 +339,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP //更新之前先更新界面的map类型属性 checkoutMapType(plot); - if(vanChartFillStylePane != null) {//配色 + if (vanChartFillStylePane != null) {//配色 plot.setPlotFillStyle(vanChartFillStylePane.updateBean()); } @@ -369,16 +368,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP updateCondition(plot.getConditionCollection().getDefaultAttr()); - checkAreaSeriesFillColorPane(plot.getPlotStyle()); + checkAreaSeriesFillColorPane(((VanChartPlot) plot).getGradientStyle()); } protected void checkoutMapType(Plot plot) { } - protected void checkAreaSeriesFillColorPane(int plotStyle) { + protected void checkAreaSeriesFillColorPane(GradientStyle gradientStyle) { if (areaSeriesFillColorPane != null) { - areaSeriesFillColorPane.checkoutAlpha(plotStyle == ChartConstants.STYLE_NONE); + areaSeriesFillColorPane.checkoutAlpha(gradientStyle.getGradientType() == GradientType.NONE); } }