Browse Source

Pull request #1807: CHART-14624 调整面积图系列面板不透明的enable属性的check

Merge in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit '1f25a4de4fe8d5d6f54bb3e9d27c40739bbe22e9':
  CHART-14624  调整面积图系列面板不透明的enable属性的check
feature/big-screen
Bjorn 4 years ago
parent
commit
af9fa6e7dc
  1. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartAreaFillColorConditionPane.java
  2. 15
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

9
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; 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.base.DataSeriesCondition;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane; 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.base.AttrAreaSeriesFillColorBackground;
import com.fr.plugin.chart.type.GradientType;
import com.fr.van.chart.designer.component.VanChartAreaSeriesFillColorPane; import com.fr.van.chart.designer.component.VanChartAreaSeriesFillColorPane;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -40,6 +40,7 @@ public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLine
/** /**
* 条件属性item的名称 * 条件属性item的名称
*
* @return item的名称 * @return item的名称
*/ */
public String nameForPopupMenuItem() { public String nameForPopupMenuItem() {
@ -54,13 +55,13 @@ public class VanChartAreaFillColorConditionPane extends AbstractNormalMultiLine
public void setDefault() { public void setDefault() {
//下面这句话是给各组件一个默认值 //下面这句话是给各组件一个默认值
fillColorBackground.populate(new AttrAreaSeriesFillColorBackground()); 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) { public void populate(DataSeriesCondition condition) {
if (condition instanceof AttrAreaSeriesFillColorBackground) { if (condition instanceof AttrAreaSeriesFillColorBackground) {
fillColorBackground.populate((AttrAreaSeriesFillColorBackground) condition); fillColorBackground.populate((AttrAreaSeriesFillColorBackground) condition);
fillColorBackground.checkoutAlpha(!(plot != null && plot.getPlotStyle() == ChartConstants.STYLE_SHADE)); fillColorBackground.checkoutAlpha(plot != null && ((VanChartPlot) plot).getGradientStyle().getGradientType() == GradientType.NONE);
} }
} }

15
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.base.chart.chartdata.model.NormalDataModel;
import com.fr.chart.base.AttrAlpha; import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBorder; import com.fr.chart.base.AttrBorder;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.base.GradientStyle; import com.fr.chart.base.GradientStyle;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
@ -90,7 +89,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
} }
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
JPanel colorPane = getColorPane(); JPanel colorPane = getColorPane();
if(colorPane != null) { if (colorPane != null) {
panel.add(colorPane, BorderLayout.NORTH); panel.add(colorPane, BorderLayout.NORTH);
} }
panel.add(getContentInPlotType(), BorderLayout.CENTER); panel.add(getContentInPlotType(), BorderLayout.CENTER);
@ -279,7 +278,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
checkoutMapType(plot); checkoutMapType(plot);
if(vanChartFillStylePane != null) { //配色 if (vanChartFillStylePane != null) { //配色
vanChartFillStylePane.populateBean(plot.getPlotFillStyle()); vanChartFillStylePane.populateBean(plot.getPlotFillStyle());
} }
@ -310,7 +309,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
populateCondition(plot.getConditionCollection().getDefaultAttr()); populateCondition(plot.getConditionCollection().getDefaultAttr());
checkAreaSeriesFillColorPane(plot.getPlotStyle()); checkAreaSeriesFillColorPane(((VanChartPlot) plot).getGradientStyle());
checkCompsEnabledWithLarge(plot); checkCompsEnabledWithLarge(plot);
} }
@ -340,7 +339,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//更新之前先更新界面的map类型属性 //更新之前先更新界面的map类型属性
checkoutMapType(plot); checkoutMapType(plot);
if(vanChartFillStylePane != null) {//配色 if (vanChartFillStylePane != null) {//配色
plot.setPlotFillStyle(vanChartFillStylePane.updateBean()); plot.setPlotFillStyle(vanChartFillStylePane.updateBean());
} }
@ -369,16 +368,16 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
updateCondition(plot.getConditionCollection().getDefaultAttr()); updateCondition(plot.getConditionCollection().getDefaultAttr());
checkAreaSeriesFillColorPane(plot.getPlotStyle()); checkAreaSeriesFillColorPane(((VanChartPlot) plot).getGradientStyle());
} }
protected void checkoutMapType(Plot plot) { protected void checkoutMapType(Plot plot) {
} }
protected void checkAreaSeriesFillColorPane(int plotStyle) { protected void checkAreaSeriesFillColorPane(GradientStyle gradientStyle) {
if (areaSeriesFillColorPane != null) { if (areaSeriesFillColorPane != null) {
areaSeriesFillColorPane.checkoutAlpha(plotStyle == ChartConstants.STYLE_NONE); areaSeriesFillColorPane.checkoutAlpha(gradientStyle.getGradientType() == GradientType.NONE);
} }
} }

Loading…
Cancel
Save