edu.wisc.ssec.mcidasv.startupmanager.options
Class DirectoryOption

java.lang.Object
  extended by edu.wisc.ssec.mcidasv.startupmanager.options.AbstractOption
      extended by edu.wisc.ssec.mcidasv.startupmanager.options.DirectoryOption
All Implemented Interfaces:
Option

public class DirectoryOption
extends AbstractOption


Field Summary
private  String defaultValue
           
private  DefaultMutableTreeNode selected
           
private  String value
           
 
Constructor Summary
DirectoryOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
           
 
Method Summary
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)
           
 
Methods inherited from class edu.wisc.ssec.mcidasv.startupmanager.options.AbstractOption
fromPrefsFormat, getLabel, getOptionId, getOptionPlatform, getOptionType, getOptionVisibility, onValidPlatform, toPrefsFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

selected

private DefaultMutableTreeNode selected

value

private String value

defaultValue

private final String defaultValue
Constructor Detail

DirectoryOption

public DirectoryOption(String id,
                       String label,
                       String defaultValue,
                       OptionMaster.OptionPlatform optionPlatform,
                       OptionMaster.Visibility optionVisibility)
Method Detail

exploreDirectory

private void exploreDirectory(String directory,
                              DefaultMutableTreeNode parent)

getRootNode

private DefaultMutableTreeNode getRootNode(String path)

useSelectedTreeValue

private void useSelectedTreeValue(JTree tree)

getComponent

public JPanel getComponent()
Description copied from class: AbstractOption
Returns the GUI component that represents the option. BooleanOptions are represented by a JCheckBox, while TextOptions appear as a JTextField.

Specified by:
getComponent in interface Option
Specified by:
getComponent in class AbstractOption
Returns:
The GUI representation of this option.

getValue

public String getValue()
Description copied from class: AbstractOption
Returns the value of the option. Note that BooleanOptions return either "0" or "1".

Specified by:
getValue in interface Option
Specified by:
getValue in class AbstractOption
Returns:
The current value of the option.

getUnquotedValue

public String getUnquotedValue()

setValue

public void setValue(String newValue)
Description copied from class: AbstractOption
Forces the value of the option to the data specified. Note that BooleanOptions accept either "0", or "1".

Specified by:
setValue in interface Option
Specified by:
setValue in class AbstractOption
Parameters:
newValue - New value to use.

toString

public String toString()
Description copied from class: AbstractOption
Friendly string representation of the option.

Specified by:
toString in interface Option
Specified by:
toString in class AbstractOption
Returns:
String containing relevant info about the option.
See Also:
TextOption.toString(), BooleanOption.toString()