|
|
@ -125,7 +125,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
public static final String TYPE_PANE_DEFAULT_TITLE = "DEFAULT_NAME"; |
|
|
|
public static final String TYPE_PANE_DEFAULT_TITLE = "DEFAULT_NAME"; |
|
|
|
|
|
|
|
|
|
|
|
public synchronized static ChartTypeInterfaceManager getInstance() { |
|
|
|
public synchronized static ChartTypeInterfaceManager getInstance() { |
|
|
|
|
|
|
|
|
|
|
|
return classManager; |
|
|
|
return classManager; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -158,7 +158,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static WidgetOption[] initWidgetOption() { |
|
|
|
public static WidgetOption[] initWidgetOption() { |
|
|
|
|
|
|
|
|
|
|
|
String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDs(); |
|
|
|
String[] chartIDs = ChartTypeManager.getInstance().getAllChartIDs(); |
|
|
@ -201,8 +201,8 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface()); |
|
|
|
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void readDefault() { |
|
|
|
private static void readDefault() { |
|
|
|
|
|
|
|
|
|
|
|
addChartTypeInterface(DEPRECATED_CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); |
|
|
|
addChartTypeInterface(DEPRECATED_CHART_PRIORITY, ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); |
|
|
@ -225,7 +225,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void addChartTypeInterface(String priority, String plotID, ChartTypeUIProvider provider) { |
|
|
|
private static void addChartTypeInterface(String priority, String plotID, ChartTypeUIProvider provider) { |
|
|
|
|
|
|
|
|
|
|
|
if (chartTypeInterfaces != null) { |
|
|
|
if (chartTypeInterfaces != null) { |
|
|
|
if (!chartTypeInterfaces.containsKey(priority)) { |
|
|
|
if (!chartTypeInterfaces.containsKey(priority)) { |
|
|
|
//新建一个具体图表列表
|
|
|
|
//新建一个具体图表列表
|
|
|
@ -252,14 +252,14 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 把所有的pane加到list里 |
|
|
|
* 把所有的pane加到list里 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param paneList pane容器 |
|
|
|
* @param paneList pane容器 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends ChartProvider>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane) { |
|
|
|
public void addPlotTypePaneList(List<FurtherBasicBeanPane<? extends ChartProvider>> paneList, Map<String, Map<String, FurtherBasicBeanPane<? extends ChartProvider>>> allChartTypePane) { |
|
|
|
|
|
|
|
|
|
|
|
List<Integer> priorityList = getPriorityInOrder(); |
|
|
|
List<Integer> priorityList = getPriorityInOrder(); |
|
|
|
for (Integer aPriorityList : priorityList) { |
|
|
|
for (Integer aPriorityList : priorityList) { |
|
|
|
String priority = String.valueOf(aPriorityList); |
|
|
|
String priority = String.valueOf(aPriorityList); |
|
|
@ -302,9 +302,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
public String getTitle4PopupWindow(String plotID) { |
|
|
|
public String getTitle4PopupWindow(String plotID) { |
|
|
|
return getName(plotID); |
|
|
|
return getName(plotID); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private List<Integer> getPriorityInOrder() { |
|
|
|
private List<Integer> getPriorityInOrder() { |
|
|
|
|
|
|
|
|
|
|
|
List<Integer> priorityList = new ArrayList<Integer>(); |
|
|
|
List<Integer> priorityList = new ArrayList<Integer>(); |
|
|
|
if (chartTypeInterfaces != null) { |
|
|
|
if (chartTypeInterfaces != null) { |
|
|
|
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); |
|
|
|
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); |
|
|
@ -468,7 +468,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return provider.getPlotTypePane().title4PopupWindow(); |
|
|
|
return provider.getPlotTypePane().title4PopupWindow(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { |
|
|
|
public ChartDataPane getChartDataPane(String plotID, AttributeChangeListener listener) { |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plotID); |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plotID); |
|
|
|
if (provider != null) { |
|
|
|
if (provider != null) { |
|
|
@ -477,7 +477,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return new ChartDataPane(listener); |
|
|
|
return new ChartDataPane(listener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) { |
|
|
|
public AbstractChartAttrPane[] getAttrPaneArray(String plotID, AttributeChangeListener listener) { |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plotID); |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plotID); |
|
|
|
if (provider != null) { |
|
|
|
if (provider != null) { |
|
|
@ -485,9 +485,9 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return new AbstractChartAttrPane[0]; |
|
|
|
return new AbstractChartAttrPane[0]; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { |
|
|
|
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { |
|
|
|
|
|
|
|
|
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
@ -497,7 +497,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { |
|
|
|
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { |
|
|
|
|
|
|
|
|
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
@ -507,7 +507,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ConditionAttributesPane getPlotConditionPane(Plot plot) { |
|
|
|
public ConditionAttributesPane getPlotConditionPane(Plot plot) { |
|
|
|
|
|
|
|
|
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
@ -517,7 +517,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) { |
|
|
|
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) { |
|
|
|
|
|
|
|
|
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
|
ChartTypeUIProvider provider = getChartTypeInterface(plot.getPlotID()); |
|
|
@ -527,7 +527,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 是否使用默认的界面,为了避免界面来回切换 |
|
|
|
* 是否使用默认的界面,为了避免界面来回切换 |
|
|
|
* |
|
|
|
* |
|
|
@ -540,7 +540,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
if (provider != null) { |
|
|
|
if (provider != null) { |
|
|
|
return provider.isUseDefaultPane(); |
|
|
|
return provider.isUseDefaultPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -555,31 +555,37 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mount(PluginSingleInjection injection) { |
|
|
|
public void mount(PluginSingleInjection injection) { |
|
|
|
|
|
|
|
|
|
|
|
if (isIndependentChartUIProvider(injection)) { |
|
|
|
if (isChartTypeUIProvider(injection)) { |
|
|
|
|
|
|
|
String id = injection.getAttribute("chartID"); |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(id)) { |
|
|
|
|
|
|
|
id = injection.getAttribute("plotID"); |
|
|
|
|
|
|
|
} |
|
|
|
String priority = injection.getAttribute("priority", DEFAULT_PRIORITY); |
|
|
|
String priority = injection.getAttribute("priority", DEFAULT_PRIORITY); |
|
|
|
String plotID = injection.getAttribute("plotID"); |
|
|
|
|
|
|
|
ChartTypeUIProvider instance = (ChartTypeUIProvider) injection.getObject(); |
|
|
|
ChartTypeUIProvider instance = (ChartTypeUIProvider) injection.getObject(); |
|
|
|
addChartTypeInterface(priority, plotID, instance); |
|
|
|
addChartTypeInterface(priority, id, instance); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void demount(PluginSingleInjection injection) { |
|
|
|
public void demount(PluginSingleInjection injection) { |
|
|
|
|
|
|
|
|
|
|
|
if (isIndependentChartUIProvider(injection)) { |
|
|
|
if (isChartTypeUIProvider(injection)) { |
|
|
|
String priority = injection.getAttribute("priority", DEFAULT_PRIORITY); |
|
|
|
String priority = injection.getAttribute("priority", DEFAULT_PRIORITY); |
|
|
|
String plotID = injection.getAttribute("plotID"); |
|
|
|
String id = injection.getAttribute("chartID"); |
|
|
|
removeChartTypeInterface(priority, plotID); |
|
|
|
if (StringUtils.isEmpty(id)) { |
|
|
|
|
|
|
|
id = injection.getAttribute("plotID"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
removeChartTypeInterface(priority, id); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void removeChartTypeInterface(String priority, String plotID) { |
|
|
|
private void removeChartTypeInterface(String priority, String plotID) { |
|
|
|
|
|
|
|
|
|
|
|
if (chartTypeInterfaces != null) { |
|
|
|
if (chartTypeInterfaces != null) { |
|
|
|
if (chartTypeInterfaces.containsKey(priority)) { |
|
|
|
if (chartTypeInterfaces.containsKey(priority)) { |
|
|
|
Map<String, ChartTypeUIProvider> chartUIList = chartTypeInterfaces.get(priority); |
|
|
|
Map<String, ChartTypeUIProvider> chartUIList = chartTypeInterfaces.get(priority); |
|
|
@ -587,11 +593,11 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isIndependentChartUIProvider(PluginSingleInjection injection) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return !(injection == null || injection.getObject() == null) && ChartTypeUIProvider.XML_TAG.equals(injection.getName()) && injection.getObject() instanceof ChartTypeUIProvider; |
|
|
|
|
|
|
|
|
|
|
|
private boolean isChartTypeUIProvider(PluginSingleInjection injection) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return !(injection == null || injection.getObject() == null) && (ChartTypeUIProvider.XML_TAG.equals(injection.getName()) || ChartTypeUIProvider.OLD_TAG.equals(injection.getName())) && injection.getObject() instanceof ChartTypeUIProvider; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|