Browse Source

update

master
Fangjie Hu 8 years ago
parent
commit
a1fab4d88e
  1. 19
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

19
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -284,8 +284,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){ while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String chartID = (String) entry.getKey(); String chartID = (String) entry.getKey();
if (plotInChart(plotID, chartID)) {
return getChartDataPane(chartID, plotID, listener); return getChartDataPane(chartID, plotID, listener);
} }
}
return getChartDataPane(DEFAULT_CHART_ID, plotID, listener); return getChartDataPane(DEFAULT_CHART_ID, plotID, listener);
} }
@ -310,8 +312,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){ while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String chartID = (String) entry.getKey(); String chartID = (String) entry.getKey();
if (plotInChart(plotID, chartID)) {
return getAttrPaneArray(chartID, plotID, listener); return getAttrPaneArray(chartID, plotID, listener);
} }
}
return getAttrPaneArray(DEFAULT_CHART_ID, plotID, listener); return getAttrPaneArray(DEFAULT_CHART_ID, plotID, listener);
} }
@ -324,8 +328,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){ while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String chartID = (String) entry.getKey(); String chartID = (String) entry.getKey();
if (plotInChart(plot.getPlotID(), chartID)) {
return getTableDataSourcePane(chartID, plot, parent); return getTableDataSourcePane(chartID, plot, parent);
} }
}
return getTableDataSourcePane(DEFAULT_CHART_ID, plot, parent); return getTableDataSourcePane(DEFAULT_CHART_ID, plot, parent);
} }
@ -339,11 +345,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){ while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String chartID = (String) entry.getKey(); String chartID = (String) entry.getKey();
String plotID = plot.getPlotID();
if (plotInChart(plotID, chartID)) {
return getReportDataSourcePane(chartID, plot, parent); return getReportDataSourcePane(chartID, plot, parent);
} }
}
return getReportDataSourcePane(DEFAULT_CHART_ID, plot, parent); return getReportDataSourcePane(DEFAULT_CHART_ID, plot, parent);
} }
private boolean plotInChart(String plotID, String chartID) {
return chartTypeInterfaces != null
&& chartTypeInterfaces.containsKey(chartID)
&& chartTypeInterfaces.get(chartID).containsKey(plotID);
}
private AbstractReportDataContentPane getReportDataSourcePane(String chartID, Plot plot, ChartDataPane parent) { private AbstractReportDataContentPane getReportDataSourcePane(String chartID, Plot plot, ChartDataPane parent) {
return chartTypeInterfaces.get(chartID).get(plot.getPlotID()).getReportDataSourcePane(plot, parent); return chartTypeInterfaces.get(chartID).get(plot.getPlotID()).getReportDataSourcePane(plot, parent);
} }
@ -354,8 +369,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){ while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String chartID = (String) entry.getKey(); String chartID = (String) entry.getKey();
if (plotInChart(plot.getPlotID(), chartID)) {
return getPlotConditionPane(chartID, plot); return getPlotConditionPane(chartID, plot);
} }
}
return getPlotConditionPane(DEFAULT_CHART_ID, plot); return getPlotConditionPane(DEFAULT_CHART_ID, plot);
} }
@ -369,8 +386,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){ while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String chartID = (String) entry.getKey(); String chartID = (String) entry.getKey();
if (plotInChart(plot.getPlotID(), chartID)) {
return getPlotSeriesPane(chartID, parent, plot); return getPlotSeriesPane(chartID, parent, plot);
} }
}
return getPlotSeriesPane(DEFAULT_CHART_ID, parent, plot); return getPlotSeriesPane(DEFAULT_CHART_ID, parent, plot);
} }

Loading…
Cancel
Save