diff --git a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java index 55f6076d8..e3fa679d6 100644 --- a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java @@ -93,7 +93,6 @@ import java.util.Map; import static com.fr.chart.charttypes.ChartTypeManager.CHART_PRIORITY; import static com.fr.chart.charttypes.ChartTypeManager.VAN_CHART_PRIORITY; -import static com.fr.chart.charttypes.ChartTypeManager.enabledChart; /** * Created by eason on 14/12/29. @@ -171,9 +170,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr private static void readVanChart() { - if (chartTypeInterfaces.containsKey(VAN_CHART_PRIORITY)) { - return; - } addChartTypeInterface(VAN_CHART_PRIORITY, PiePlot4VanChart.VAN_CHART_PIE_PLOT, new PieIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface()); @@ -197,10 +193,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr private static void readDefault() { - - if (chartTypeInterfaces.containsKey(CHART_PRIORITY)) { - return; - } addChartTypeInterface(CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); addChartTypeInterface(CHART_PRIORITY, ChartConstants.LINE_CHART, new LineIndependentChartInterface()); @@ -276,16 +268,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr Map.Entry entry = iterator.next(); String plotID = entry.getKey(); - if (enabledChart(plotID)) { - AbstractChartTypePane pane = entry.getValue().getPlotTypePane(); - pane.setPlotID(plotID); - paneList.add(pane); + AbstractChartTypePane pane = entry.getValue().getPlotTypePane(); + pane.setPlotID(plotID); + paneList.add(pane); - if (allChartTypePane.get(priority) == null) { - allChartTypePane.put(priority, new LinkedHashMap>()); - } - allChartTypePane.get(priority).put(plotID, pane); + if (allChartTypePane.get(priority) == null) { + allChartTypePane.put(priority, new LinkedHashMap>()); } + allChartTypePane.get(priority).put(plotID, pane); } } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java index 4aa92a09e..6239c4faf 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java @@ -154,12 +154,12 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane { isCustom = true; //先重置自定义组合面板,如果不重置,无法获取选择顺序 - if (lastState == customChart.length - 1 && samePlot) { + if (lastState == customChart.length - 1 && isSamePlot()) { //更新数据配置,刪除已经不在的图表数据 dealCustomDefinition(chart); customSelectPane.updateBean(chart); - } else if (samePlot) {//如果是同一个图表切换过来,则重置面板 + } else if (isSamePlot()) {//如果是同一个图表切换过来,则重置面板 customSelectPane.populateBean(chart); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java index c1ce66503..ead6be339 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java @@ -29,7 +29,11 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{ private static final long serialVersionUID = 7743244512351499265L; private UICheckBox largeModelCheckBox; - protected Boolean samePlot; + private Boolean samePlot; + + protected Boolean isSamePlot() { + return samePlot; + } //新图表暂时还没有平面3d,渐变高光等布局。 @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java index 2b8ea1ac8..b7b1c6295 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java @@ -113,7 +113,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane { Plot plot = chart.getPlot(); if(plot instanceof VanChartMapPlot) { sourceChoosePane.updateBean((VanChartMapPlot) plot); - if(!samePlot || (typeChanged && samePlot)){ + if(!isSamePlot() || (typeChanged && isSamePlot())){ resetAttr(plot); } }