Browse Source

插件读取顺序

master
xiaohu 8 years ago
parent
commit
81ebf05ac0
  1. 13
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

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

@ -44,6 +44,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
private static ChartTypeInterfaceManager classManager = null;
//判断默认图表是否读取
private static boolean isReadDefault = false;
private static LinkedHashMap<String, IndependentChartUIProvider> chartTypeInterfaces = new LinkedHashMap<String, IndependentChartUIProvider>();
public synchronized static ChartTypeInterfaceManager getInstance() {
@ -80,6 +83,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
private static void readDefault() {
if (!isReadDefault) {
chartTypeInterfaces.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface());
chartTypeInterfaces.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface());
chartTypeInterfaces.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface());
@ -97,16 +101,17 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
chartTypeInterfaces.put(ChartConstants.MAP_CHART, new MapIndependentChartInterface());
chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface());
chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface());
isReadDefault = true;
}
}
public String getIconPath(String plotID) {
if (chartTypeInterfaces.get(plotID) != null) {
return chartTypeInterfaces.get(plotID).getIconPath();
}else {
return StringUtils.EMPTY;
if (!isReadDefault){
readDefault();
}
return chartTypeInterfaces.get(plotID).getIconPath();
}
/**

Loading…
Cancel
Save