Class DirectoryOption
java.lang.Object
edu.wisc.ssec.mcidasv.startupmanager.options.AbstractOption
edu.wisc.ssec.mcidasv.startupmanager.options.DirectoryOption
- All Implemented Interfaces:
Option
Represents a startup option that should be selected from the contents of a
given directory. The visual representation of this class is a tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
Regular expression pattern for ensuring that no quote marks are present invalue
.private final String
Default value of this option.private DefaultMutableTreeNode
Selected tree node.private String
Current option value. -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryOption
(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
exploreDirectory
(String directory, DefaultMutableTreeNode parent) Returns the GUI component that represents the option.private DefaultMutableTreeNode
getRootNode
(String path) getValue()
Returns the value of the option.void
Forces the value of the option to the data specified.toString()
Friendly string representation of the option.private void
useSelectedTreeValue
(JTree tree) Methods inherited from class edu.wisc.ssec.mcidasv.startupmanager.options.AbstractOption
fromPrefsFormat, getLabel, getOptionId, getOptionPlatform, getOptionType, getOptionVisibility, isValidPrefFormat, onValidPlatform, toPrefsFormat
-
Field Details
-
CLEAN_VALUE_REGEX
Regular expression pattern for ensuring that no quote marks are present invalue
. -
selected
Selected tree node. Value may benull
. -
value
Current option value. EmptyString
signifies no selection. -
defaultValue
Default value of this option.
-
-
Constructor Details
-
DirectoryOption
public DirectoryOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
-
-
Method Details
-
exploreDirectory
-
getRootNode
-
useSelectedTreeValue
-
getComponent
Description copied from class:AbstractOption
Returns the GUI component that represents the option.BooleanOptions
are represented by aJCheckBox
, whileTextOptions
appear as aJTextField
.- Specified by:
getComponent
in interfaceOption
- Specified by:
getComponent
in classAbstractOption
- Returns:
- The GUI representation of this option.
-
getValue
Description copied from class:AbstractOption
Returns the value of the option. Note thatBooleanOptions
return either "0" or "1".- Specified by:
getValue
in interfaceOption
- Specified by:
getValue
in classAbstractOption
- Returns:
- The current value of the option.
-
getUnquotedValue
-
setValue
Description copied from class:AbstractOption
Forces the value of the option to the data specified. Note thatBooleanOptions
accept either "0", or "1".- Specified by:
setValue
in interfaceOption
- Specified by:
setValue
in classAbstractOption
- Parameters:
newValue
- New value to use.
-
toString
Description copied from class:AbstractOption
Friendly string representation of the option.- Specified by:
toString
in interfaceOption
- Specified by:
toString
in classAbstractOption
- Returns:
String
containing relevant info about the option.- See Also:
-