public class DirectoryOption extends AbstractOption
Modifier and Type | Field and Description |
---|---|
private String |
defaultValue |
private DefaultMutableTreeNode |
selected |
private String |
value |
Constructor and Description |
---|
DirectoryOption(String id,
String label,
String defaultValue,
OptionMaster.OptionPlatform optionPlatform,
OptionMaster.Visibility optionVisibility) |
Modifier and Type | Method and Description |
---|---|
private void |
exploreDirectory(String directory,
DefaultMutableTreeNode parent) |
JComponent |
getComponent()
Returns the GUI component that represents the option.
|
private DefaultMutableTreeNode |
getRootNode(String path) |
String |
getUnquotedValue() |
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.
|
private void |
useSelectedTreeValue(JTree tree) |
fromPrefsFormat, getLabel, getOptionId, getOptionPlatform, getOptionType, getOptionVisibility, onValidPlatform, toPrefsFormat
private DefaultMutableTreeNode selected
private final String defaultValue
public DirectoryOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
private void exploreDirectory(String directory, DefaultMutableTreeNode parent)
private DefaultMutableTreeNode getRootNode(String path)
private void useSelectedTreeValue(JTree tree)
public JComponent getComponent()
AbstractOption
BooleanOption
s are represented by a JCheckBox
, while
TextOption
s appear as a JTextField
.getComponent
in interface Option
getComponent
in class AbstractOption
public String getValue()
AbstractOption
BooleanOption
s
return either "0" or "1".getValue
in interface Option
getValue
in class AbstractOption
public String getUnquotedValue()
public void setValue(String newValue)
AbstractOption
BooleanOption
s 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
TextOption.toString()
,
BooleanOption.toString()