From 35eadb071d744c51dd6222a81381404e8a5da93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 3 Dec 2019 09:45:03 +0800 Subject: [PATCH] =?UTF-8?q?CHART-11446=20=E6=B2=A1=E6=9C=89=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=80=BC=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E7=81=B0?= =?UTF-8?q?=E5=8C=96=E6=B1=87=E6=80=BB=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/AbstractCustomFieldComboBoxPane.java | 11 +++++++++++ .../chartx/fields/AbstractDataSetFieldsPane.java | 11 +++++++++++ .../chartx/fields/diff/MultiPieDataSetFieldsPane.java | 2 ++ .../fields/diff/StructureDataSetFieldsPane.java | 1 + .../fields/diff/WordCloudDataSetFieldsPane.java | 1 + 5 files changed, 26 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java index 4012366a3..e93900ea6 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java @@ -27,6 +27,8 @@ import java.util.List; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; /** * Created by shine on 2018/9/12. @@ -148,9 +150,18 @@ public abstract class AbstractCustomFieldComboBoxPane extends UIComboBoxPane< private void initComponents() { series = new UIComboBox(); + value = valueComboBoxHasNone() ? new UIComboBoxWithNone() : new UIComboBox(); + value.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + function.setEnabled(value.getSelectedItem() != null); + } + }); + function = new CalculateComboBox(); + function.setEnabled(false); Component[][] components = new Component[][]{ new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), SwingConstants.LEFT), series}, diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java index 9e8848ebc..034e17fdb 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java @@ -21,6 +21,8 @@ import java.util.Arrays; import java.util.List; import java.awt.BorderLayout; import java.awt.Component; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems; @@ -145,4 +147,13 @@ public abstract class AbstractDataSetFieldsPane