You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
935 B
39 lines
935 B
package com.fr.plugin.third.party.jsdggac; |
|
|
|
|
|
import com.fanruan.api.design.ui.component.UIComboBox; |
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import java.util.List; |
|
|
|
public class UIComboBoxWithNone extends UIComboBox { |
|
protected String getDefaultLocaleString() { |
|
return Toolkit.i18nText("Fine-Design_Chart_Use_None"); |
|
} |
|
|
|
public UIComboBoxWithNone() { |
|
this.addDefaultItem(); |
|
} |
|
|
|
public void refreshBoxItems(List var1) { |
|
super.refreshBoxItems(var1); |
|
this.addDefaultItem(); |
|
} |
|
|
|
public void clearBoxItems() { |
|
super.clearBoxItems(); |
|
this.addDefaultItem(); |
|
} |
|
|
|
private void addDefaultItem() { |
|
this.addItem(this.getDefaultLocaleString()); |
|
} |
|
|
|
public void setSelectedItem(Object var1) { |
|
super.setSelectedItem(var1); |
|
if (this.getSelectedIndex() == -1) { |
|
super.setSelectedItem(this.getDefaultLocaleString()); |
|
} |
|
|
|
} |
|
} |