From 1071b66fe7a4d50d40e795967e88dd967092004c Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 26 Sep 2019 20:10:28 +0800 Subject: [PATCH] =?UTF-8?q?CHART-4027=20=E4=BB=A3=E7=A0=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=20chartCount=E5=92=8CswichState=E6=98=AF=E4=B8=80?= =?UTF-8?q?=E4=BB=B6=E4=BA=8B=E6=83=85=EF=BC=8C=E6=89=80=E4=BB=A5swichStat?= =?UTF-8?q?e=E4=B8=8D=E9=9C=80=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/ChartTypeButtonPane.java | 9 +-------- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) 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 4dedb133d3..880c1a7792 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 @@ -3,7 +3,6 @@ package com.fr.design.mainframe.chart.gui; import com.fr.base.BaseUtils; import com.fr.chart.base.AttrChangeConfig; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.beans.BasicBeanPane; @@ -187,12 +186,6 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void calculateMultiChartMode() { //设置切换功能是否可用 editingCollection.getChangeConfigAttr().setEnable(changeEnable()); - //多图表切换模式 - if (editingCollection.getChartCount() > 1) { - editingCollection.setState(SwitchState.CHANGE); - } else { - editingCollection.setState(SwitchState.DEFAULT); - } } /** @@ -363,7 +356,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen private void checkConfigButtonVisible() { addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider().getID())); //新建一个collection - if (editingCollection.getState() == SwitchState.DEFAULT && editingCollection.getSelectedChartProvider() != null) { + if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider() != null) { //Chart 不支持图表切换 configButton.setVisible(supportChange()); } 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 e9dcbedce3..eb43b8594d 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 @@ -1,7 +1,6 @@ package com.fr.design.mainframe.chart.gui; import com.fr.chart.chartattr.ChartCollection; -import com.fr.chart.chartattr.SwitchState; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; @@ -218,7 +217,7 @@ public class ChartTypePane extends AbstractChartAttrPane{ //第一步就是重构cards cards.clear(); if (enabledChart) { - if (collection.getState() == SwitchState.DEFAULT) { + if (collection.getChartCount() == 1) { addAllCards(); } else { addOnePriorityCards(priority);