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 PatternRegular expression pattern for ensuring that no quote marks are present invalue.private final StringDefault value of this option.private DefaultMutableTreeNodeSelected tree node.private StringCurrent option value. -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidexploreDirectory(String directory, DefaultMutableTreeNode parent) Returns the GUI component that represents the option.private DefaultMutableTreeNodegetRootNode(String path) getValue()Returns the value of the option.voidForces the value of the option to the data specified.toString()Friendly string representation of the option.private voiduseSelectedTreeValue(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. EmptyStringsignifies 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:AbstractOptionReturns the GUI component that represents the option.BooleanOptionsare represented by aJCheckBox, whileTextOptionsappear as aJTextField.- Specified by:
getComponentin interfaceOption- Specified by:
getComponentin classAbstractOption- Returns:
- The GUI representation of this option.
-
getValue
Description copied from class:AbstractOptionReturns the value of the option. Note thatBooleanOptionsreturn either "0" or "1".- Specified by:
getValuein interfaceOption- Specified by:
getValuein classAbstractOption- Returns:
- The current value of the option.
-
getUnquotedValue
-
setValue
Description copied from class:AbstractOptionForces the value of the option to the data specified. Note thatBooleanOptionsaccept either "0", or "1".- Specified by:
setValuein interfaceOption- Specified by:
setValuein classAbstractOption- Parameters:
newValue- New value to use.
-
toString
Description copied from class:AbstractOptionFriendly string representation of the option.- Specified by:
toStringin interfaceOption- Specified by:
toStringin classAbstractOption- Returns:
Stringcontaining relevant info about the option.- See Also:
-