public class DiscreteDescriptor extends SettingDescriptor
| Constructor and Description |
|---|
DiscreteDescriptor(java.lang.String name,
java.lang.String label,
java.lang.String defaultValue,
java.util.List<NVP> values)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
javax.swing.JComponent |
createInput(Settings settings,
boolean readOnly)
Creates the component that will accept the user input.
|
NVP |
findNVP(java.lang.String value)
Gets the NVP associated to the given value.
|
java.lang.String |
getDefaultValue()
Gets the default value as a string.
|
java.util.List<NVP> |
getValues()
Gets the list of valid choices.
|
getGridWidth, getLabel, getName, isAllowUserDefaults, isDisplaySetting, isEnabled, isShowLabel, isSupportsDisable, setAllowUserDefaults, setDefaultValue, setEnabled, setGridWidth, setShowLabel, setSupportsDisablepublic DiscreteDescriptor(java.lang.String name,
java.lang.String label,
java.lang.String defaultValue,
java.util.List<NVP> values)
name - name of this setting (key)label - label displayed to the userdefaultValue - default value for the settingvalues - set of valid choices (as Name Value Pairs ie NVP)public java.lang.String getDefaultValue()
getDefaultValue in class SettingDescriptorpublic java.util.List<NVP> getValues()
public NVP findNVP(java.lang.String value)
public javax.swing.JComponent createInput(Settings settings, boolean readOnly)
SettingDescriptorcreateInput in class SettingDescriptorsettings - settings for the studyreadOnly - true if the component should not accept user input