|
|
@ -176,7 +176,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public ChartProvider getChangeStateNewChart() { |
|
|
|
public ChartProvider getChangeStateNewChart() { |
|
|
|
ChartProvider chart = editingCollection.getSelectedChart(ChartProvider.class); |
|
|
|
ChartProvider chart = editingCollection.getSelectedChartProvider(ChartProvider.class); |
|
|
|
String chartID = chart.getID(); |
|
|
|
String chartID = chart.getID(); |
|
|
|
String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID); |
|
|
|
String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID); |
|
|
|
return ChartTypeManager.getInstanceWithCheck().getFirstChart(priority); |
|
|
|
return ChartTypeManager.getInstanceWithCheck().getFirstChart(priority); |
|
|
@ -199,7 +199,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean supportChange() { |
|
|
|
private boolean supportChange() { |
|
|
|
return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChart(ChartProvider.class).getClass()); |
|
|
|
return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChartProvider(ChartProvider.class).getClass()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ActionListener configListener = new ActionListener() { |
|
|
|
ActionListener configListener = new ActionListener() { |
|
|
@ -354,9 +354,9 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void checkConfigButtonVisible() { |
|
|
|
private void checkConfigButtonVisible() { |
|
|
|
addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChart(ChartProvider.class).getID())); |
|
|
|
addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider(ChartProvider.class).getID())); |
|
|
|
//新建一个collection
|
|
|
|
//新建一个collection
|
|
|
|
if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChart(ChartProvider.class) != null) { |
|
|
|
if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider(ChartProvider.class) != null) { |
|
|
|
//Chart 不支持图表切换
|
|
|
|
//Chart 不支持图表切换
|
|
|
|
configButton.setVisible(supportChange()); |
|
|
|
configButton.setVisible(supportChange()); |
|
|
|
} |
|
|
|
} |
|
|
@ -484,7 +484,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen |
|
|
|
private void deleteAButton() { |
|
|
|
private void deleteAButton() { |
|
|
|
//先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除
|
|
|
|
//先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除
|
|
|
|
//记录改变前的plotID
|
|
|
|
//记录改变前的plotID
|
|
|
|
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart(ChartProvider.class).getID(); |
|
|
|
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider(ChartProvider.class).getID(); |
|
|
|
if (editingCollection != null) { |
|
|
|
if (editingCollection != null) { |
|
|
|
int count = editingCollection.getChartCount(); |
|
|
|
int count = editingCollection.getChartCount(); |
|
|
|
for (int i = 0; i < count; i++) { |
|
|
|
for (int i = 0; i < count; i++) { |
|
|
@ -564,7 +564,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen |
|
|
|
if (isEnabled()) { |
|
|
|
if (isEnabled()) { |
|
|
|
noSelected(); |
|
|
|
noSelected(); |
|
|
|
//记录改变前的plotID
|
|
|
|
//记录改变前的plotID
|
|
|
|
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart(ChartProvider.class).getID(); |
|
|
|
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider(ChartProvider.class).getID(); |
|
|
|
changeCollectionSelected(getButtonName()); |
|
|
|
changeCollectionSelected(getButtonName()); |
|
|
|
setSelectedWithFireListener(true); |
|
|
|
setSelectedWithFireListener(true); |
|
|
|
fireSelectedChanged(); |
|
|
|
fireSelectedChanged(); |
|
|
|