From 763a7276814a1ef982d420b41c17345d7ad3b542 Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Tue, 29 Oct 2019 19:29:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-10921=20=E5=85=BC=E5=AE=B9=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/chart/ChartCommonWizardPane.java | 2 +- .../main/java/com/fr/design/chart/ChartTypePane.java | 2 +- .../com/fr/design/chartx/AbstractChartDataPane.java | 4 ++-- .../com/fr/design/chartx/impl/AbstractDataPane.java | 4 ++-- .../com/fr/design/chartx/impl/AbstractOtherPane.java | 4 ++-- .../fr/design/mainframe/MiddleChartPropertyPane.java | 2 +- .../com/fr/design/mainframe/chart/ChartEditPane.java | 4 ++-- .../mainframe/chart/gui/ChartTypeButtonPane.java | 12 ++++++------ .../fr/design/mainframe/chart/gui/ChartTypePane.java | 8 ++++---- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java index e4de3686ef..a1f8ed6943 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java @@ -12,7 +12,7 @@ public abstract class ChartCommonWizardPane extends ChartWizardPane { return; } - populate(cc.getSelectedChart(ChartProvider.class)); + populate(cc.getTheSelectedChart(ChartProvider.class)); } public abstract void populate(ChartProvider chart); diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java index 3cc9ba6a72..a55e1aa487 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java @@ -123,7 +123,7 @@ public class ChartTypePane extends ChartCommonWizardPane { return; } - ChartProvider chart4Update = cc.getSelectedChart(ChartProvider.class); + ChartProvider chart4Update = cc.getTheSelectedChart(ChartProvider.class); if (chart4Update == null) { String plotID = this.chartIDs[mainTypeList.getSelectedIndex()]; ChartProvider chart = ChartTypeManager.getInstance().getCharts(plotID)[iconViewList.getSelectedIndex()]; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java b/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java index 61359d91b7..86ee76b451 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java @@ -26,7 +26,7 @@ public abstract class AbstractChartDataPane extends if (collection == null) { return; } - AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class); + AbstractChartWithData chart = collection.getTheSelectedChart(AbstractChartWithData.class); if (chart == null) { return; } @@ -32,7 +32,7 @@ public abstract class AbstractOtherPane extends if (collection == null) { return; } - AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class); + AbstractChartWithData chart = collection.getTheSelectedChart(AbstractChartWithData.class); if (chart == null) { return; } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java index 7d77a0ac60..fc5e1135d6 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java @@ -93,7 +93,7 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{ * @param ePane 面板 */ public void populateChartPropertyPane(ChartCollection collection, TargetComponent ePane) { - addChartEditPane(collection.getSelectedChart(ChartProvider.class).getID()); + addChartEditPane(collection.getTheSelectedChart(ChartProvider.class).getID()); setSupportCellData(true); this.container.setEPane(ePane); chartEditPane.populate(collection); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index 6bd6383212..c1a51e0296 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -111,7 +111,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 if (!ComparatorUtils.equals(collection, lastCollection)) { - VanChart vanChart = collection.getSelectedChart(VanChart.class); + VanChart vanChart = collection.getTheSelectedChart(VanChart.class); if (vanChart != null) { //此处画图 vanChart.demoImgEvent(true); @@ -230,7 +230,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 return; } - ChartProvider chartProvider = collection.getSelectedChart(ChartProvider.class); + ChartProvider chartProvider = collection.getTheSelectedChart(ChartProvider.class); if (checkNeedsReLayout(chartProvider)) { String chartID = chartProvider.getID(); if ("WaferChipChart".equals(chartID) || "BoxPlotChart".equals(chartID)) { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 7d64588c50..226929ed57 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -176,7 +176,7 @@ public class ChartTypeButtonPane extends BasicBeanPane 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 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 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 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 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(); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 26f0a38e9c..d60db4dfaf 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -208,7 +208,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ //处理办法:这边除了重构 下拉项选项和cardNames 还需要把cards重构下(不需要init pane,只需要我需要的拿出来就好了) private void relayout(ChartCollection collection){ //重构需要重构下拉框选项和cardNames - ChartProvider chart = collection.getSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); String chartID = chart.getID(); String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID); boolean enabledChart = ChartTypeManager.enabledChart(chartID); @@ -294,7 +294,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ * @param collection */ public void reLayoutEditPane(String lastPlotID, ChartCollection collection){ - ChartProvider chart = collection.getSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); String plotID = chart.getID(); boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); if (editPane != null && editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){ @@ -315,7 +315,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void populate(ChartCollection collection) { editingCollection = collection; - ChartProvider chart = collection.getSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); this.remove(leftContentPane); initContentPane(); @@ -333,7 +333,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void update(ChartCollection collection) { editingCollection = collection; buttonPane.update(collection);// 内部操作时 已经做过处理. - ChartProvider chart = collection.getSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); chartTypeComBox.updateBean(chart); } From 903a6bc110590bc27a4e22a46df37574665afe11 Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Wed, 30 Oct 2019 09:58:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=91=BD=E5=90=8D=E6=9B=B4=E6=9C=89=E9=92=88?= =?UTF-8?q?=E5=AF=B9=E6=80=A7=E4=BA=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/chart/ChartCommonWizardPane.java | 2 +- .../main/java/com/fr/design/chart/ChartTypePane.java | 2 +- .../com/fr/design/chartx/AbstractChartDataPane.java | 4 ++-- .../com/fr/design/chartx/impl/AbstractDataPane.java | 4 ++-- .../com/fr/design/chartx/impl/AbstractOtherPane.java | 4 ++-- .../fr/design/mainframe/MiddleChartPropertyPane.java | 2 +- .../com/fr/design/mainframe/chart/ChartEditPane.java | 4 ++-- .../mainframe/chart/gui/ChartTypeButtonPane.java | 12 ++++++------ .../fr/design/mainframe/chart/gui/ChartTypePane.java | 8 ++++---- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java index a1f8ed6943..0e11e84132 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java @@ -12,7 +12,7 @@ public abstract class ChartCommonWizardPane extends ChartWizardPane { return; } - populate(cc.getTheSelectedChart(ChartProvider.class)); + populate(cc.getSelectedChartProvider(ChartProvider.class)); } public abstract void populate(ChartProvider chart); diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java index a55e1aa487..19c6137858 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java @@ -123,7 +123,7 @@ public class ChartTypePane extends ChartCommonWizardPane { return; } - ChartProvider chart4Update = cc.getTheSelectedChart(ChartProvider.class); + ChartProvider chart4Update = cc.getSelectedChartProvider(ChartProvider.class); if (chart4Update == null) { String plotID = this.chartIDs[mainTypeList.getSelectedIndex()]; ChartProvider chart = ChartTypeManager.getInstance().getCharts(plotID)[iconViewList.getSelectedIndex()]; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java b/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java index 86ee76b451..b8690f8df6 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/AbstractChartDataPane.java @@ -26,7 +26,7 @@ public abstract class AbstractChartDataPane extends if (collection == null) { return; } - AbstractChartWithData chart = collection.getTheSelectedChart(AbstractChartWithData.class); + AbstractChartWithData chart = collection.getSelectedChartProvider(AbstractChartWithData.class); if (chart == null) { return; } @@ -32,7 +32,7 @@ public abstract class AbstractOtherPane extends if (collection == null) { return; } - AbstractChartWithData chart = collection.getTheSelectedChart(AbstractChartWithData.class); + AbstractChartWithData chart = collection.getSelectedChartProvider(AbstractChartWithData.class); if (chart == null) { return; } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java index fc5e1135d6..39832c3777 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java @@ -93,7 +93,7 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{ * @param ePane 面板 */ public void populateChartPropertyPane(ChartCollection collection, TargetComponent ePane) { - addChartEditPane(collection.getTheSelectedChart(ChartProvider.class).getID()); + addChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID()); setSupportCellData(true); this.container.setEPane(ePane); chartEditPane.populate(collection); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index c1a51e0296..4ef5beffb1 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -111,7 +111,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 if (!ComparatorUtils.equals(collection, lastCollection)) { - VanChart vanChart = collection.getTheSelectedChart(VanChart.class); + VanChart vanChart = collection.getSelectedChartProvider(VanChart.class); if (vanChart != null) { //此处画图 vanChart.demoImgEvent(true); @@ -230,7 +230,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 return; } - ChartProvider chartProvider = collection.getTheSelectedChart(ChartProvider.class); + ChartProvider chartProvider = collection.getSelectedChartProvider(ChartProvider.class); if (checkNeedsReLayout(chartProvider)) { String chartID = chartProvider.getID(); if ("WaferChipChart".equals(chartID) || "BoxPlotChart".equals(chartID)) { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 226929ed57..8877ed9dac 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -176,7 +176,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen * @return */ public ChartProvider getChangeStateNewChart() { - ChartProvider chart = editingCollection.getTheSelectedChart(ChartProvider.class); + ChartProvider chart = editingCollection.getSelectedChartProvider(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 implemen } private boolean supportChange() { - return supportChangeConfigChartClassSet.contains(editingCollection.getTheSelectedChart(ChartProvider.class).getClass()); + return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChartProvider(ChartProvider.class).getClass()); } ActionListener configListener = new ActionListener() { @@ -354,9 +354,9 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen } private void checkConfigButtonVisible() { - addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getTheSelectedChart(ChartProvider.class).getID())); + addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider(ChartProvider.class).getID())); //新建一个collection - if (editingCollection.getChartCount() == 1 && editingCollection.getTheSelectedChart(ChartProvider.class) != null) { + if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider(ChartProvider.class) != null) { //Chart 不支持图表切换 configButton.setVisible(supportChange()); } @@ -484,7 +484,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void deleteAButton() { //先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除 //记录改变前的plotID - String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getTheSelectedChart(ChartProvider.class).getID(); + String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider(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 implemen if (isEnabled()) { noSelected(); //记录改变前的plotID - String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getTheSelectedChart(ChartProvider.class).getID(); + String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider(ChartProvider.class).getID(); changeCollectionSelected(getButtonName()); setSelectedWithFireListener(true); fireSelectedChanged(); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index d60db4dfaf..3740e3e121 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -208,7 +208,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ //处理办法:这边除了重构 下拉项选项和cardNames 还需要把cards重构下(不需要init pane,只需要我需要的拿出来就好了) private void relayout(ChartCollection collection){ //重构需要重构下拉框选项和cardNames - ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class); String chartID = chart.getID(); String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID); boolean enabledChart = ChartTypeManager.enabledChart(chartID); @@ -294,7 +294,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ * @param collection */ public void reLayoutEditPane(String lastPlotID, ChartCollection collection){ - ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class); String plotID = chart.getID(); boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID); if (editPane != null && editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){ @@ -315,7 +315,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void populate(ChartCollection collection) { editingCollection = collection; - ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class); this.remove(leftContentPane); initContentPane(); @@ -333,7 +333,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ public void update(ChartCollection collection) { editingCollection = collection; buttonPane.update(collection);// 内部操作时 已经做过处理. - ChartProvider chart = collection.getTheSelectedChart(ChartProvider.class); + ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class); chartTypeComBox.updateBean(chart); }