Browse Source

图表优先级

master
Fangjie Hu 8 years ago
parent
commit
08ba606024
  1. 183
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  2. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

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

@ -54,6 +54,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
if (classManager == null) { if (classManager == null) {
classManager = new ChartTypeInterfaceManager(); classManager = new ChartTypeInterfaceManager();
chartTypeInterfaces.clear(); chartTypeInterfaces.clear();
classManager.readDefault();
} }
return classManager; return classManager;
} }
@ -70,9 +71,6 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
GeneralContext.addPluginReadListener(new PluginReadListener() { GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override @Override
public void success() { public void success() {
if (chartTypeInterfaces.size() == 0) {
ChartTypeInterfaceManager.getInstance().readDefault();
}
//重新注册designModuleFactory //重新注册designModuleFactory
DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption());
} }
@ -127,6 +125,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
} }
private static void readDefault() { private static void readDefault() {
if (chartTypeInterfaces.containsKey(ChartTypeManager.CHART_PRIORITY)){
return;
}
LinkedHashMap<String, IndependentChartUIProvider> chartUIList = new LinkedHashMap<String, IndependentChartUIProvider>(); LinkedHashMap<String, IndependentChartUIProvider> chartUIList = new LinkedHashMap<String, IndependentChartUIProvider>();
chartUIList.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); chartUIList.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface());
chartUIList.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); chartUIList.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface());
@ -146,7 +147,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
chartUIList.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); chartUIList.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface());
chartUIList.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); chartUIList.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface());
chartTypeInterfaces.put(ChartTypeManager.DEFAULT_CHART_ID, chartUIList); chartTypeInterfaces.put(ChartTypeManager.CHART_PRIORITY, chartUIList);
} }
public String getIconPath(String plotID) { public String getIconPath(String plotID) {
@ -154,8 +155,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
String imagePath = getIconPath(chartID, plotID); String imagePath = getIconPath(priority, plotID);
if (!StringUtils.isEmpty(imagePath)) { if (!StringUtils.isEmpty(imagePath)) {
return imagePath; return imagePath;
} }
@ -164,23 +165,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
return StringUtils.EMPTY; return StringUtils.EMPTY;
} }
private String getIconPath(String chartID, String plotID) { private String getIconPath(String priority, String plotID) {
if (chartTypeInterfaces.get(chartID) != null && chartTypeInterfaces.get(chartID).get(plotID) != null) { if (chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null) {
return chartTypeInterfaces.get(chartID).get(plotID).getIconPath(); return chartTypeInterfaces.get(priority).get(plotID).getIconPath();
}else { }else {
return StringUtils.EMPTY; return StringUtils.EMPTY;
} }
} }
public static void addChartTypeInterface(IndependentChartUIProvider provider, String chartID, String plotID) { public static void addChartTypeInterface(IndependentChartUIProvider provider, String priority, String plotID) {
if (chartTypeInterfaces != null){ if (chartTypeInterfaces != null){
if (!chartTypeInterfaces.containsKey(chartID)){ if (!chartTypeInterfaces.containsKey(priority)){
//新建一个具体图表列表 //新建一个具体图表列表
LinkedHashMap<String, IndependentChartUIProvider> chartUIList = new LinkedHashMap<String, IndependentChartUIProvider>(); LinkedHashMap<String, IndependentChartUIProvider> chartUIList = new LinkedHashMap<String, IndependentChartUIProvider>();
chartUIList.put(plotID, provider); chartUIList.put(plotID, provider);
chartTypeInterfaces.put(chartID, chartUIList); chartTypeInterfaces.put(priority, chartUIList);
}else { }else {
LinkedHashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(chartID); LinkedHashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(priority);
if (!chartUIList.containsKey(plotID)) { if (!chartUIList.containsKey(plotID)) {
chartUIList.put(plotID, provider); chartUIList.put(plotID, provider);
} }
@ -194,7 +195,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
* @param className 类名 * @param className 类名
* @param plotID 标志ID * @param plotID 标志ID
*/ */
public void addChartInterface(String className, String chartID, String plotID, PluginSimplify simplify) { public void addChartInterface(String className, String priority, String plotID, PluginSimplify simplify) {
if (StringUtils.isNotBlank(className)) { if (StringUtils.isNotBlank(className)) {
try { try {
Class<?> clazz = Class.forName(className); Class<?> clazz = Class.forName(className);
@ -206,7 +207,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) {
PluginMessage.remindUpdate(className); PluginMessage.remindUpdate(className);
} else { } else {
ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, chartID, plotID); ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID);
} }
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
FRLogger.getLogger().error("class not found:" + e.getMessage()); FRLogger.getLogger().error("class not found:" + e.getMessage());
@ -230,8 +231,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
Iterator chartUIIterator = chartTypeInterfaces.get(chartID).entrySet().iterator(); Iterator chartUIIterator = chartTypeInterfaces.get(priority).entrySet().iterator();
while (chartUIIterator.hasNext()) { while (chartUIIterator.hasNext()) {
Map.Entry chartUIEntry = (Map.Entry) chartUIIterator.next(); Map.Entry chartUIEntry = (Map.Entry) chartUIIterator.next();
IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue();
@ -240,13 +241,13 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
} }
} }
public String[] getTitle4PopupWindow(String chartID){ public String[] getTitle4PopupWindow(String priority){
if (chartID.isEmpty()){ if (priority.isEmpty()){
return getTitle4PopupWindow(); return getTitle4PopupWindow();
} }
String[] names = new String[getChartSize(chartID)]; String[] names = new String[getChartSize(priority)];
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(chartID)){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)){
HashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(chartID); HashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(priority);
Iterator iterator = chartUIList.entrySet().iterator(); Iterator iterator = chartUIList.entrySet().iterator();
int i = 0; int i = 0;
while (iterator.hasNext()){ while (iterator.hasNext()){
@ -261,13 +262,13 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
/** /**
* 获取指定图表的标题 * 获取指定图表的标题
* @param chartID * @param priority
* @return * @return
*/ */
public String getTitle4PopupWindow(String chartID, String plotID){ public String getTitle4PopupWindow(String priority, String plotID){
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(chartID) && chartTypeInterfaces.get(chartID).containsKey(plotID)){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){
HashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(chartID); HashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(priority);
IndependentChartUIProvider provider = chartTypeInterfaces.get(chartID).get(plotID); IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID);
return provider.getPlotTypePane().title4PopupWindow(); return provider.getPlotTypePane().title4PopupWindow();
} }
@ -275,34 +276,28 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
} }
private String[] getTitle4PopupWindow(){ private String[] getTitle4PopupWindow(){
List<Integer> priorityList = new ArrayList<Integer>();
int size = 0; int size = 0;
if (chartTypeInterfaces != null){ if (chartTypeInterfaces != null){
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
size += getChartSize(chartID); priorityList.add(Integer.valueOf(priority));
size += getChartSize(priority);
} }
String[] names = new String[size]; String[] names = new String[size];
priorityList = ChartTypeManager.orderInPriority(priorityList);
int index = 0; int index = 0;
//处理vanChart for (int i = 0; i < priorityList.size(); i++){
Iterator vanChartUI = chartTypeInterfaces.get(ChartTypeManager.vanChartID).entrySet().iterator(); String priority = String.valueOf(priorityList.get(i));
index = fetchNames(vanChartUI, names, index); Iterator chartUI = chartTypeInterfaces.get(priority).entrySet().iterator();
//处理chart index = fetchNames(chartUI, names, index);
Iterator chartUI = chartTypeInterfaces.get(ChartTypeManager.chartID).entrySet().iterator();
index = fetchNames(chartUI, names, index);
//其它图表
Iterator i = chartTypeInterfaces.entrySet().iterator();
while (i.hasNext()){
Map.Entry entry = (Map.Entry) i.next();
String chartID = (String) entry.getKey();
if (!(ComparatorUtils.equals(chartID, ChartTypeManager.chartID) || ComparatorUtils.equals(chartID, ChartTypeManager.vanChartID))) {
Iterator otherChartUI = chartTypeInterfaces.get(chartID).entrySet().iterator();
index = fetchNames(otherChartUI, names, index);
}
} }
return names; return names;
} }
@ -322,26 +317,26 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
if (plotInChart(plotID, chartID)) { if (plotInChart(plotID, priority)) {
return getChartDataPane(chartID, plotID, listener); return getChartDataPane(priority, plotID, listener);
} }
} }
return getChartDataPane(ChartTypeManager.DEFAULT_CHART_ID, plotID, listener); return getChartDataPane(ChartTypeManager.CHART_PRIORITY, plotID, listener);
} }
private ChartDataPane getChartDataPane(String chartID, String plotID, AttributeChangeListener listener) { private ChartDataPane getChartDataPane(String priority, String plotID, AttributeChangeListener listener) {
return chartTypeInterfaces.get(chartID).get(plotID).getChartDataPane(listener); return chartTypeInterfaces.get(priority).get(plotID).getChartDataPane(listener);
} }
/** /**
* 获取对应ID的图表数量 * 获取对应ID的图表数量
* @param chartID * @param key
* @return * @return
*/ */
private int getChartSize(String chartID){ private int getChartSize(String key){
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(chartID)){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)){
return chartTypeInterfaces.get(chartID).size(); return chartTypeInterfaces.get(key).size();
} }
return 0; return 0;
} }
@ -350,32 +345,32 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
if (plotInChart(plotID, chartID)) { if (plotInChart(plotID, priority)) {
return getAttrPaneArray(chartID, plotID, listener); return getAttrPaneArray(priority, plotID, listener);
} }
} }
return getAttrPaneArray(ChartTypeManager.DEFAULT_CHART_ID, plotID, listener); return getAttrPaneArray(ChartTypeManager.CHART_PRIORITY, plotID, listener);
} }
private AbstractChartAttrPane[] getAttrPaneArray(String chartID, String plotID, AttributeChangeListener listener) { private AbstractChartAttrPane[] getAttrPaneArray(String priority, String plotID, AttributeChangeListener listener) {
return chartTypeInterfaces.get(chartID).get(plotID).getAttrPaneArray(listener); return chartTypeInterfaces.get(priority).get(plotID).getAttrPaneArray(listener);
} }
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) {
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
if (plotInChart(plot.getPlotID(), chartID)) { if (plotInChart(plot.getPlotID(), priority)) {
return getTableDataSourcePane(chartID, plot, parent); return getTableDataSourcePane(priority, plot, parent);
} }
} }
return getTableDataSourcePane(ChartTypeManager.DEFAULT_CHART_ID, plot, parent); return getTableDataSourcePane(ChartTypeManager.CHART_PRIORITY, plot, parent);
} }
private AbstractTableDataContentPane getTableDataSourcePane(String chartID, Plot plot, ChartDataPane parent) { private AbstractTableDataContentPane getTableDataSourcePane(String priority, Plot plot, ChartDataPane parent) {
return chartTypeInterfaces.get(chartID).get(plot.getPlotID()).getTableDataSourcePane(plot, parent); return chartTypeInterfaces.get(priority).get(plot.getPlotID()).getTableDataSourcePane(plot, parent);
} }
@ -383,23 +378,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
String plotID = plot.getPlotID(); String plotID = plot.getPlotID();
if (plotInChart(plotID, chartID)) { if (plotInChart(plotID, priority)) {
return getReportDataSourcePane(chartID, plot, parent); return getReportDataSourcePane(priority, plot, parent);
} }
} }
return getReportDataSourcePane(ChartTypeManager.DEFAULT_CHART_ID, plot, parent); return getReportDataSourcePane(ChartTypeManager.CHART_PRIORITY, plot, parent);
} }
private boolean plotInChart(String plotID, String chartID) { private boolean plotInChart(String plotID, String priority) {
return chartTypeInterfaces != null return chartTypeInterfaces != null
&& chartTypeInterfaces.containsKey(chartID) && chartTypeInterfaces.containsKey(priority)
&& chartTypeInterfaces.get(chartID).containsKey(plotID); && chartTypeInterfaces.get(priority).containsKey(plotID);
} }
private AbstractReportDataContentPane getReportDataSourcePane(String chartID, Plot plot, ChartDataPane parent) { private AbstractReportDataContentPane getReportDataSourcePane(String priority, Plot plot, ChartDataPane parent) {
return chartTypeInterfaces.get(chartID).get(plot.getPlotID()).getReportDataSourcePane(plot, parent); return chartTypeInterfaces.get(priority).get(plot.getPlotID()).getReportDataSourcePane(plot, parent);
} }
@ -407,16 +402,16 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
if (plotInChart(plot.getPlotID(), chartID)) { if (plotInChart(plot.getPlotID(), priority)) {
return getPlotConditionPane(chartID, plot); return getPlotConditionPane(priority, plot);
} }
} }
return getPlotConditionPane(ChartTypeManager.DEFAULT_CHART_ID, plot); return getPlotConditionPane(ChartTypeManager.CHART_PRIORITY, plot);
} }
private ConditionAttributesPane getPlotConditionPane(String chartID, Plot plot) { private ConditionAttributesPane getPlotConditionPane(String priority, Plot plot) {
return chartTypeInterfaces.get(chartID).get(plot.getPlotID()).getPlotConditionPane(plot); return chartTypeInterfaces.get(priority).get(plot.getPlotID()).getPlotConditionPane(plot);
} }
@ -424,16 +419,16 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
if (plotInChart(plot.getPlotID(), chartID)) { if (plotInChart(plot.getPlotID(), priority)) {
return getPlotSeriesPane(chartID, parent, plot); return getPlotSeriesPane(priority, parent, plot);
} }
} }
return getPlotSeriesPane(ChartTypeManager.DEFAULT_CHART_ID, parent, plot); return getPlotSeriesPane(ChartTypeManager.CHART_PRIORITY, parent, plot);
} }
private BasicBeanPane<Plot> getPlotSeriesPane(String chartID, ChartStylePane parent, Plot plot) { private BasicBeanPane<Plot> getPlotSeriesPane(String priority, ChartStylePane parent, Plot plot) {
return chartTypeInterfaces.get(chartID).get(plot.getPlotID()).getPlotSeriesPane(parent, plot); return chartTypeInterfaces.get(priority).get(plot.getPlotID()).getPlotSeriesPane(parent, plot);
} }
/** /**
@ -446,19 +441,19 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Iterator iterator = chartTypeInterfaces.entrySet().iterator(); Iterator iterator = chartTypeInterfaces.entrySet().iterator();
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 priority = (String) entry.getKey();
if (chartTypeInterfaces.get(chartID).containsKey(plotID)){ if (chartTypeInterfaces.get(priority).containsKey(plotID)){
return isUseDefaultPane(chartID, plotID); return isUseDefaultPane(priority, plotID);
} }
} }
return true; return true;
} }
private boolean isUseDefaultPane(String chartID, String plotID){ private boolean isUseDefaultPane(String priority, String plotID){
if (chartTypeInterfaces.containsKey(chartID) && chartTypeInterfaces.get(chartID).containsKey(plotID)) { if (chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) {
return chartTypeInterfaces.get(chartID).get(plotID).isUseDefaultPane(); return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane();
} }
return true; return true;
@ -476,7 +471,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
extraChartDesignInterfaceList.add(tagName); extraChartDesignInterfaceList.add(tagName);
} }
if (IndependentChartUIProvider.XML_TAG.equals(tagName)) { if (IndependentChartUIProvider.XML_TAG.equals(tagName)) {
addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("chartID", ChartTypeManager.DEFAULT_CHART_ID),reader.getAttrAsString("plotID", ""), simplify); addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.CHART_PRIORITY),reader.getAttrAsString("plotID", ""), simplify);
} }
} }
} }

4
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -188,7 +188,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
public void reactor(ChartCollection collection){ public void reactor(ChartCollection collection){
//重构需要重构下拉框选项和cardNames //重构需要重构下拉框选项和cardNames
Chart chart = collection.getSelectedChart(); Chart chart = collection.getSelectedChart();
String chartID = chart.getChartID(); String chartID = chart.getPriority();
if (collection.getState() == SwitchState.DEFAULT){ if (collection.getState() == SwitchState.DEFAULT){
chartID = StringUtils.EMPTY; chartID = StringUtils.EMPTY;
} }
@ -197,7 +197,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
//重构下拉框选项 //重构下拉框选项
reactorComboBox(); reactorComboBox();
//重新选择选中的下拉项 //重新选择选中的下拉项
chartID = chart.getChartID(); chartID = chart.getPriority();
String plotID = chart.getPlot().getPlotID(); String plotID = chart.getPlot().getPlotID();
Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID);
jcb.setSelectedItem(item); jcb.setSelectedItem(item);

Loading…
Cancel
Save