public final class DirectoryOption extends AbstractOption
Modifier and Type | Field and Description |
---|---|
private static java.util.regex.Pattern |
CLEAN_VALUE_REGEX
Regular expression pattern for ensuring that no quote marks are present in
value . |
private java.lang.String |
defaultValue
Default value of this option.
|
private static org.slf4j.Logger |
logger |
private javax.swing.tree.DefaultMutableTreeNode |
selected
Selected tree node.
|
private java.lang.String |
value
Current option value.
|
Constructor and Description |
---|
DirectoryOption(java.lang.String id,
java.lang.String label,
java.lang.String defaultValue,
OptionMaster.OptionPlatform optionPlatform,
OptionMaster.Visibility optionVisibility) |
Modifier and Type | Method and Description |
---|---|
private void |
exploreDirectory(java.lang.String directory,
javax.swing.tree.DefaultMutableTreeNode parent) |
javax.swing.JPanel |
getComponent()
Returns the GUI component that represents the option.
|
private javax.swing.tree.DefaultMutableTreeNode |
getRootNode(java.lang.String path) |
java.lang.String |
getUnquotedValue() |
java.lang.String |
getValue()
Returns the value of the option.
|
void |
setValue(java.lang.String newValue)
Forces the value of the option to the data specified.
|
java.lang.String |
toString()
Friendly string representation of the option.
|
private void |
useSelectedTreeValue(javax.swing.JTree tree) |
fromPrefsFormat, getLabel, getOptionId, getOptionPlatform, getOptionType, getOptionVisibility, isValidPrefFormat, onValidPlatform, toPrefsFormat
private static final org.slf4j.Logger logger
private static final java.util.regex.Pattern CLEAN_VALUE_REGEX
value
.private javax.swing.tree.DefaultMutableTreeNode selected
null
.private java.lang.String value
String
signifies no selection.private final java.lang.String defaultValue
public DirectoryOption(java.lang.String id, java.lang.String label, java.lang.String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
private void exploreDirectory(java.lang.String directory, javax.swing.tree.DefaultMutableTreeNode parent)
private javax.swing.tree.DefaultMutableTreeNode getRootNode(java.lang.String path)
private void useSelectedTreeValue(javax.swing.JTree tree)
public javax.swing.JPanel getComponent()
AbstractOption
BooleanOptions
are represented by a
JCheckBox
, while TextOptions
appear as a
JTextField
.getComponent
in interface Option
getComponent
in class AbstractOption
public java.lang.String getValue()
AbstractOption
BooleanOptions
return either "0" or
"1".getValue
in interface Option
getValue
in class AbstractOption
public java.lang.String getUnquotedValue()
public void setValue(java.lang.String newValue)
AbstractOption
BooleanOptions
accept either "0", or
"1".setValue
in interface Option
setValue
in class AbstractOption
newValue
- New value to use.public java.lang.String toString()
AbstractOption
toString
in interface Option
toString
in class AbstractOption
String
containing relevant info about the option.TextOption.toString()
,
BooleanOption.toString()