Browse Source

CHART-2611

master
zheng 6 years ago
parent
commit
5bb2544c1c
  1. 22
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  2. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java
  3. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  4. 2
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java

22
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.CHART_PRIORITY;
import static com.fr.chart.charttypes.ChartTypeManager.VAN_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. * Created by eason on 14/12/29.
@ -171,9 +170,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
private static void readVanChart() { 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, 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_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface()); 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() { private static void readDefault() {
if (chartTypeInterfaces.containsKey(CHART_PRIORITY)) {
return;
}
addChartTypeInterface(CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); addChartTypeInterface(CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface());
addChartTypeInterface(CHART_PRIORITY, ChartConstants.LINE_CHART, new LineIndependentChartInterface()); addChartTypeInterface(CHART_PRIORITY, ChartConstants.LINE_CHART, new LineIndependentChartInterface());
@ -276,16 +268,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
Map.Entry<String, IndependentChartUIProvider> entry = iterator.next(); Map.Entry<String, IndependentChartUIProvider> entry = iterator.next();
String plotID = entry.getKey(); String plotID = entry.getKey();
if (enabledChart(plotID)) { AbstractChartTypePane pane = entry.getValue().getPlotTypePane();
AbstractChartTypePane pane = entry.getValue().getPlotTypePane(); pane.setPlotID(plotID);
pane.setPlotID(plotID); paneList.add(pane);
paneList.add(pane);
if (allChartTypePane.get(priority) == null) { if (allChartTypePane.get(priority) == null) {
allChartTypePane.put(priority, new LinkedHashMap<String, FurtherBasicBeanPane<? extends Chart>>()); allChartTypePane.put(priority, new LinkedHashMap<String, FurtherBasicBeanPane<? extends Chart>>());
}
allChartTypePane.get(priority).put(plotID, pane);
} }
allChartTypePane.get(priority).put(plotID, pane);
} }
} }
} }

4
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java

@ -154,12 +154,12 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
isCustom = true; isCustom = true;
//先重置自定义组合面板,如果不重置,无法获取选择顺序 //先重置自定义组合面板,如果不重置,无法获取选择顺序
if (lastState == customChart.length - 1 && samePlot) { if (lastState == customChart.length - 1 && isSamePlot()) {
//更新数据配置,刪除已经不在的图表数据 //更新数据配置,刪除已经不在的图表数据
dealCustomDefinition(chart); dealCustomDefinition(chart);
customSelectPane.updateBean(chart); customSelectPane.updateBean(chart);
} else if (samePlot) {//如果是同一个图表切换过来,则重置面板 } else if (isSamePlot()) {//如果是同一个图表切换过来,则重置面板
customSelectPane.populateBean(chart); customSelectPane.populateBean(chart);
} }
} }

6
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 static final long serialVersionUID = 7743244512351499265L;
private UICheckBox largeModelCheckBox; private UICheckBox largeModelCheckBox;
protected Boolean samePlot; private Boolean samePlot;
protected Boolean isSamePlot() {
return samePlot;
}
//新图表暂时还没有平面3d,渐变高光等布局。 //新图表暂时还没有平面3d,渐变高光等布局。
@Override @Override

2
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(); Plot plot = chart.getPlot();
if(plot instanceof VanChartMapPlot) { if(plot instanceof VanChartMapPlot) {
sourceChoosePane.updateBean((VanChartMapPlot) plot); sourceChoosePane.updateBean((VanChartMapPlot) plot);
if(!samePlot || (typeChanged && samePlot)){ if(!isSamePlot() || (typeChanged && isSamePlot())){
resetAttr(plot); resetAttr(plot);
} }
} }

Loading…
Cancel
Save