|
|
|
@ -38,20 +38,17 @@ import java.util.Map;
|
|
|
|
|
* Created by eason on 14/12/29. |
|
|
|
|
*/ |
|
|
|
|
public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { |
|
|
|
|
|
|
|
|
|
private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); |
|
|
|
|
|
|
|
|
|
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() { |
|
|
|
|
if (classManager == null) { |
|
|
|
|
classManager = new ChartTypeInterfaceManager(); |
|
|
|
|
chartTypeInterfaces.clear(); |
|
|
|
|
//默认图表类型在新图表类型后面读取
|
|
|
|
|
classManager.readDefault(); |
|
|
|
|
classManager.readXMLFile(); |
|
|
|
|
} |
|
|
|
|
return classManager; |
|
|
|
@ -70,7 +67,6 @@ 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()); |
|
|
|
@ -89,9 +85,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
|
|
|
|
|
chartTypeInterfaces.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); |
|
|
|
|
chartTypeInterfaces.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); |
|
|
|
|
} |
|
|
|
|
isReadDefault = true; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getIconPath(String plotID) { |
|
|
|
|
return chartTypeInterfaces.get(plotID).getIconPath(); |
|
|
|
@ -136,7 +129,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
|
|
|
|
|
* @param paneList pane容器 |
|
|
|
|
*/ |
|
|
|
|
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends Chart>> paneList) { |
|
|
|
|
classManager.readDefault(); |
|
|
|
|
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); |
|
|
|
|
while (iterator.hasNext()) { |
|
|
|
|
Map.Entry entry = (Map.Entry) iterator.next(); |
|
|
|
|