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