|
|
@ -10,25 +10,25 @@ import java.util.List; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class UIComboBoxWithNone extends UIComboBox { |
|
|
|
public class UIComboBoxWithNone extends UIComboBox { |
|
|
|
|
|
|
|
|
|
|
|
private static String getNoneLocaleString() { |
|
|
|
protected String getDefaultLocaleString() { |
|
|
|
return Toolkit.i18nText("Fine-Design_Chart_Use_None"); |
|
|
|
return Toolkit.i18nText("Fine-Design_Chart_Use_None"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void refreshBoxItems(List list) { |
|
|
|
public void refreshBoxItems(List list) { |
|
|
|
super.refreshBoxItems(list); |
|
|
|
super.refreshBoxItems(list); |
|
|
|
addNoneItem(); |
|
|
|
addDefaultItem(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void clearBoxItems() { |
|
|
|
public void clearBoxItems() { |
|
|
|
super.clearBoxItems(); |
|
|
|
super.clearBoxItems(); |
|
|
|
addNoneItem(); |
|
|
|
addDefaultItem(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addNoneItem() { |
|
|
|
private void addDefaultItem() { |
|
|
|
addItem(getNoneLocaleString()); |
|
|
|
addItem(getDefaultLocaleString()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ public class UIComboBoxWithNone extends UIComboBox { |
|
|
|
super.setSelectedItem(anObject); |
|
|
|
super.setSelectedItem(anObject); |
|
|
|
|
|
|
|
|
|
|
|
if (getSelectedIndex() == -1) {//找不到的都选中无。中文的无 英文下是none。
|
|
|
|
if (getSelectedIndex() == -1) {//找不到的都选中无。中文的无 英文下是none。
|
|
|
|
super.setSelectedItem(getNoneLocaleString()); |
|
|
|
super.setSelectedItem(getDefaultLocaleString()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|