public class BooleanOption extends AbstractOption
Constructor and Description |
---|
BooleanOption(String id,
String label,
String defaultValue,
OptionMaster.OptionPlatform optionPlatform,
OptionMaster.Visibility optionVisibility) |
Modifier and Type | Method and Description |
---|---|
JCheckBox |
getComponent()
Returns the GUI component that represents the option.
|
String |
getValue()
Returns the value of the option.
|
void |
setValue(String newValue)
Forces the value of the option to the data specified.
|
String |
toString()
Friendly string representation of the option.
|
fromPrefsFormat, getLabel, getOptionId, getOptionPlatform, getOptionType, getOptionVisibility, isValidPrefFormat, onValidPlatform, toPrefsFormat
public BooleanOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
public JCheckBox getComponent()
AbstractOption
BooleanOptions
are represented by a
JCheckBox
, while TextOptions
appear as a
JTextField
.getComponent
in interface Option
getComponent
in class AbstractOption
public String getValue()
AbstractOption
BooleanOptions
return either "0" or
"1".getValue
in interface Option
getValue
in class AbstractOption
public void setValue(String newValue)
AbstractOption
BooleanOptions
accept either "0", or
"1".setValue
in interface Option
setValue
in class AbstractOption
newValue
- New value to use.public String toString()
AbstractOption
toString
in interface Option
toString
in class AbstractOption
String
containing relevant info about the option.TextOption.toString()
,
toString()