From b7a81c4daccf6047e9d8c43f58853547f183355a Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 19 Sep 2018 17:35:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=BA=E8=AF=B4=E6=98=8E=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=92=8C=E5=80=BC=E4=B8=8B=E6=8B=89=E6=A1=86=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=80=89=E9=A1=B9=E2=80=9C=E6=97=A0=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/ExtendedCustomFieldComboBoxPane.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java index 5ff47c128..dfa7d793e 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java @@ -11,16 +11,12 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itable.UITable; import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper; import com.fr.stable.StringUtils; - -import javax.swing.JComponent; -import javax.swing.JPanel; -import javax.swing.JTable; -import javax.swing.SwingConstants; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; @@ -30,6 +26,10 @@ import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; import java.util.List; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; /** * Created by shine on 2018/9/12. @@ -119,6 +119,7 @@ public class ExtendedCustomFieldComboBoxPane extends UIComboBoxPane Date: Thu, 20 Sep 2018 10:37:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=BA=E2=80=9C=E5=80=BC=E2=80=9D?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=B7=BB=E5=8A=A0=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E2=80=9C=E6=97=A0=E2=80=9D=E7=9A=84=E5=88=A4=E6=96=AD=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractExtendedChartTableDataPane.java | 13 ++++++---- .../ExtendedCustomFieldComboBoxPane.java | 26 ++++++++++++++++--- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java index 19a7b8e16..0ac454634 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartTableDataPane.java @@ -10,14 +10,13 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.general.GeneralUtils; - -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import javax.swing.SwingConstants; import java.awt.BorderLayout; import java.awt.Component; import java.util.Arrays; import java.util.List; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.SwingConstants; /** * Created by shine on 2018/3/2. @@ -54,7 +53,7 @@ public abstract class AbstractExtendedChartTableDataPane fieldList = new ArrayList(); + public ExtendedCustomFieldComboBoxPane(boolean hasNoneItem) { + this.hasNoneItem = hasNoneItem; + } + @Override protected void initLayout() { this.setLayout(new BorderLayout(0, 6)); @@ -119,7 +126,11 @@ public class ExtendedCustomFieldComboBoxPane extends UIComboBoxPane list = ob.getCustomFields(); + if (hasNoneItem) { + value.addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); + } + if (list.size() == 2) { series.setSelectedItem(list.get(0).getFieldName()); value.setSelectedItem(list.get(1).getFieldName()); - value.addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); function.populateBean((AbstractDataFunction) list.get(1).getDataFunction()); } + + if (value.getSelectedItem() == null) { + value.setSelectedItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); + } } @Override From c3fc7be77cfde08fb878fefc316e206ca904f254 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 20 Sep 2018 14:35:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/ExtendedCustomFieldComboBoxPane.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java index 426540d13..c4e23faf9 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java @@ -166,24 +166,19 @@ public class ExtendedCustomFieldComboBoxPane extends UIComboBoxPane list = ob.getCustomFields(); - if (hasNoneItem) { - value.addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); - } - if (list.size() == 2) { series.setSelectedItem(list.get(0).getFieldName()); value.setSelectedItem(list.get(1).getFieldName()); function.populateBean((AbstractDataFunction) list.get(1).getDataFunction()); } - - if (value.getSelectedItem() == null) { - value.setSelectedItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); - } } @Override