public final class DirectoryOption extends AbstractOption
| Modifier and Type | Field and Description |
|---|---|
private static Pattern |
CLEAN_VALUE_REGEX
Regular expression pattern for ensuring that no quote marks are present in
value. |
private String |
defaultValue
Default value of this option.
|
private static org.slf4j.Logger |
logger |
private DefaultMutableTreeNode |
selected
Selected tree node.
|
private String |
value
Current option 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) |
JPanel |
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, isValidPrefFormat, onValidPlatform, toPrefsFormatprivate static final org.slf4j.Logger logger
private static final Pattern CLEAN_VALUE_REGEX
value.private DefaultMutableTreeNode selected
null.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 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 String getUnquotedValue()
public 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()