public abstract class SettingDescriptor
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
SettingDescriptor(java.lang.String name,
java.lang.String label,
java.lang.Object defaultValue)
Constructor.
|
protected |
SettingDescriptor(java.lang.String name,
java.lang.String label,
java.lang.Object defaultValue,
boolean showLabel)
Constructor.
|
protected |
SettingDescriptor(java.lang.String name,
java.lang.String label,
java.lang.Object defaultValue,
boolean showLabel,
boolean enabled,
boolean supportsDisable)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract javax.swing.JComponent |
createInput(Settings settings,
boolean readOnly)
Creates the component that will accept the user input.
|
java.lang.Object |
getDefaultValue()
Gets the default value for this setting.
|
int |
getGridWidth()
Gets the number of columns occupied by the input component.
|
java.lang.String |
getLabel()
Gets the label for this setting (displayed to the user).
|
java.lang.String |
getName()
Gets the name of this setting.
|
boolean |
isAllowUserDefaults()
Indicates if user "Save As Defaults" operations apply to this setting.
|
boolean |
isDisplaySetting()
Indicates if this setting is used to affect the appearance of the of the study/strategy
|
boolean |
isEnabled()
Indicates if the setting is enabled.
|
boolean |
isShowLabel()
If true, the label for this setting will be displayed to the user.
|
boolean |
isSupportsDisable()
If true, this setting can be disabled by the user.
|
void |
setAllowUserDefaults(boolean allowUserDefaults)
Sets the ability of the user to override defaults for this setting
|
protected void |
setDefaultValue(java.lang.Object value)
Sets the default value for this setting.
|
protected void |
setEnabled(boolean b)
Sets the enabled attribute.
|
void |
setGridWidth(int width)
Sets the number of columns occupied by the input component.
|
void |
setShowLabel(boolean b)
Sets the show label attribute for the setting.
|
void |
setSupportsDisable(boolean b)
If true, this setting can be disabled by the user.
|
protected SettingDescriptor(java.lang.String name, java.lang.String label, java.lang.Object defaultValue)
name
- setting input namelabel
- label displayed to the userdefaultValue
- default value for this settingprotected SettingDescriptor(java.lang.String name, java.lang.String label, java.lang.Object defaultValue, boolean showLabel)
name
- setting input namelabel
- label displayed to the userdefaultValue
- default value for this settingshowLabel
- true if the label should be shownprotected SettingDescriptor(java.lang.String name, java.lang.String label, java.lang.Object defaultValue, boolean showLabel, boolean enabled, boolean supportsDisable)
name
- setting input namelabel
- label displayed to the userdefaultValue
- default value for this settingshowLabel
- true if the label should be shownenabled
- true if this setting is enabledsupportsDisable
- true if the user can disable this settingpublic java.lang.String getLabel()
public java.lang.String getName()
public java.lang.Object getDefaultValue()
protected void setDefaultValue(java.lang.Object value)
value
- default value for this settingpublic boolean isShowLabel()
public void setShowLabel(boolean b)
b
- true if the label should be shown for the labelpublic boolean isSupportsDisable()
public void setSupportsDisable(boolean b)
b
- true if this descriptor supports being disabled by the user.public boolean isEnabled()
protected void setEnabled(boolean b)
b
- true if this setting is enabledpublic boolean isDisplaySetting()
public int getGridWidth()
public void setGridWidth(int width)
width
- number of columns occupied by the input componentpublic abstract javax.swing.JComponent createInput(Settings settings, boolean readOnly)
settings
- settings for the studyreadOnly
- true if the component should not accept user inputpublic boolean isAllowUserDefaults()
public void setAllowUserDefaults(boolean allowUserDefaults)
allowUserDefaults
-