From 7883dc1a6bccf4b83d16bc68a9692636d82694cd Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Thu, 18 Oct 2018 15:13:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-3208=20=E7=BB=A7=E6=89=BF&=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=90=AB=E9=BB=98=E8=AE=A4=E5=80=BC=E2=80=9C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E2=80=9D=E7=9A=84=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java b/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java index 57960a47ba..7be740f4d8 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java @@ -10,7 +10,7 @@ import java.util.List; */ public class UIComboBoxWithNone extends UIComboBox { - private static String getNoneLocaleString() { + public String getNoneLocaleString() { return Toolkit.i18nText("Fine-Design_Chart_Use_None"); } From bfa56e2ba8f52c68480c92541b8da7a91f129c1e Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Thu, 18 Oct 2018 15:26:17 +0800 Subject: [PATCH 2/2] change to protected method --- .../com/fr/extended/chart/UIComboBoxWithNone.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java b/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java index 7be740f4d8..77347e0fd8 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java @@ -10,25 +10,25 @@ import java.util.List; */ public class UIComboBoxWithNone extends UIComboBox { - public String getNoneLocaleString() { + protected String getDefaultLocaleString() { return Toolkit.i18nText("Fine-Design_Chart_Use_None"); } @Override public void refreshBoxItems(List list) { super.refreshBoxItems(list); - addNoneItem(); + addDefaultItem(); } @Override public void clearBoxItems() { super.clearBoxItems(); - addNoneItem(); + addDefaultItem(); } - private void addNoneItem() { - addItem(getNoneLocaleString()); + private void addDefaultItem() { + addItem(getDefaultLocaleString()); } @@ -37,7 +37,7 @@ public class UIComboBoxWithNone extends UIComboBox { super.setSelectedItem(anObject); if (getSelectedIndex() == -1) {//找不到的都选中无。中文的无 英文下是none。 - super.setSelectedItem(getNoneLocaleString()); + super.setSelectedItem(getDefaultLocaleString()); } }