From 842c3464969a456bc6fc509ef0ff1e605e407813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 5 Aug 2020 14:26:41 +0800 Subject: [PATCH] CHART-12124 --- .../component/VanChartHeatValueColorPane.java | 2 +- .../designer/component/VanChartValueColorPane.java | 6 +++++- .../style/series/VanChartColorValueSeriesPane.java | 11 ++++++++++- .../designer/style/VanChartHeatMapSeriesPane.java | 8 ++++---- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java index 0241da848e..dac55c81c1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHeatValueColorPane.java @@ -46,7 +46,7 @@ public class VanChartHeatValueColorPane extends VanChartValueColorPane { } protected SectionLegendPane createSectionLegendPane() { - return new SectionLegendPane(parent) { + return new SectionLegendPane(getVanChartStylePane()) { @Override protected MapColorPickerPaneWithFormula createSectionIntervalConfigPane(AbstractAttrNoScrollPane parent) { return new SectionIntervalConfigPaneWithOutNum(parent) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartValueColorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartValueColorPane.java index d93957c7f6..c0d2ea7f4f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartValueColorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartValueColorPane.java @@ -38,7 +38,7 @@ public class VanChartValueColorPane extends BasicPane { //区域渐变面板 private SectionLegendPane sectionLegendPane; - public VanChartStylePane parent; + private VanChartStylePane parent; private JPanel rangeLegendPane; @@ -47,6 +47,10 @@ public class VanChartValueColorPane extends BasicPane { initComponents(); } + public VanChartStylePane getVanChartStylePane() { + return parent; + } + public void initComponents() { valueColorTypeButton = createLegendTypeButton(); valueColorTypeButton.addActionListener(new ActionListener() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartColorValueSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartColorValueSeriesPane.java index c513666227..34f86d0200 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartColorValueSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartColorValueSeriesPane.java @@ -34,7 +34,7 @@ public abstract class VanChartColorValueSeriesPane extends VanChartAbstractPlotS //颜色划分切换 private UIButtonGroup colorDivideButton; - public VanChartValueColorPane vanChartValueColorPane; + private VanChartValueColorPane vanChartValueColorPane; private JPanel colorDividePane; @@ -42,6 +42,15 @@ public abstract class VanChartColorValueSeriesPane extends VanChartAbstractPlotS super(parent, plot); } + + public VanChartValueColorPane getVanChartValueColorPane() { + return vanChartValueColorPane; + } + + public void setVanChartValueColorPane(VanChartValueColorPane vanChartValueColorPane) { + this.vanChartValueColorPane = vanChartValueColorPane; + } + //获取颜色面板 protected JPanel getColorPane() { JPanel panel = new JPanel(new BorderLayout()); diff --git a/designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java index ae1025530a..6e4309a870 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java @@ -104,14 +104,14 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane { } private JPanel createHeatColorPane() { - vanChartValueColorPane = new VanChartHeatValueColorPane((VanChartStylePane) parentPane); + setVanChartValueColorPane(new VanChartHeatValueColorPane((VanChartStylePane) parentPane)); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] row = {p}; double[] col = {f}; Component[][] components = new Component[][]{ - new Component[]{vanChartValueColorPane}, + new Component[]{getVanChartFillStylePane()}, }; JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); @@ -172,7 +172,7 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane { blur.setValue(heatMapPlot.getBlur()); maxOpacity.populateBean(heatMapPlot.getMaxOpacity()); minOpacity.populateBean(heatMapPlot.getMinOpacity()); - vanChartValueColorPane.populateBean((VanChartRangeLegend) plot.getLegend()); + getVanChartValueColorPane().populateBean((VanChartRangeLegend) plot.getLegend()); } } @@ -190,7 +190,7 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane { heatMapPlot.setBlur(blur.getValue()); heatMapPlot.setMaxOpacity(maxOpacity.updateBean()); heatMapPlot.setMinOpacity(minOpacity.updateBean()); - vanChartValueColorPane.updateBean((VanChartRangeLegend) plot.getLegend()); + getVanChartValueColorPane().updateBean((VanChartRangeLegend) plot.getLegend()); } }