public class SliderOption extends AbstractOption
| Modifier and Type | Field and Description |
|---|---|
private int |
maxValue |
private int |
minValue |
private int |
sliderValue |
private int |
total |
| Constructor and Description |
|---|
SliderOption(String id,
String label,
String defaultValue,
OptionMaster.OptionPlatform optionPlatform,
OptionMaster.Visibility optionVisibility) |
| Modifier and Type | Method and Description |
|---|---|
JPanel |
getComponent()
Returns the GUI component that represents the option.
|
String |
getValue()
Returns the value of the option.
|
private ChangeListener |
makeChangeListener(JLabel sliderLabel) |
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, toPrefsFormatprivate final int minValue
private final int maxValue
private final int total
private int sliderValue
public SliderOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
private ChangeListener makeChangeListener(JLabel sliderLabel)
public JPanel getComponent()
AbstractOptionBooleanOptions are represented by a
JCheckBox, while TextOptions appear as a
JTextField.getComponent in interface OptiongetComponent in class AbstractOptionpublic String getValue()
AbstractOptionBooleanOptions return either "0" or
"1".getValue in interface OptiongetValue in class AbstractOptionpublic void setValue(String newValue)
AbstractOptionBooleanOptions accept either "0", or
"1".setValue in interface OptionsetValue in class AbstractOptionnewValue - New value to use.public String toString()
AbstractOptiontoString in interface OptiontoString in class AbstractOptionString containing relevant info about the option.TextOption.toString(),
BooleanOption.toString()