org.fhcrc.cpl.toolbox.commandline.arguments
Class BooleanArgumentDefinition
java.lang.Object
org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl
org.fhcrc.cpl.toolbox.commandline.arguments.BooleanArgumentDefinition
- All Implemented Interfaces:
- CommandLineArgumentDefinition
public class BooleanArgumentDefinition
- extends BaseArgumentDefinitionImpl
- implements CommandLineArgumentDefinition
|
Method Summary |
javax.swing.JComponent |
addComponentsForGUI(java.awt.Container parent,
javax.swing.JDialog parentDialog,
java.lang.String defaultValue)
Add GUI components for specifying this argument. |
java.lang.Object |
convertArgumentValue(java.lang.String argumentValue)
Try to parse the argument as a Double |
java.lang.String |
getValueDescriptor()
Return a String that will be used as a generic example for the value to be used
for this argument, in auto-generated usage |
java.lang.String |
getValueFromGUIComponent(javax.swing.JComponent component)
Interrogate the GUI component used for this argument, to get its value. |
| Methods inherited from class org.fhcrc.cpl.toolbox.commandline.arguments.BaseArgumentDefinitionImpl |
addComponentsForGUISeries, getArgumentDisplayName, getArgumentName, getDefaultValue, getDefaultValueAsString, getDisplayName, getHelpText, hasDefaultValue, isAdvanced, isRequired, setAdvanced, setArgumentDisplayName, setDefaultValue, setDisplayName, setHelpText, setRequired, valueToString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fhcrc.cpl.toolbox.commandline.arguments.CommandLineArgumentDefinition |
addComponentsForGUISeries, getArgumentDisplayName, getArgumentName, getDefaultValue, getDefaultValueAsString, getHelpText, hasDefaultValue, isAdvanced, isRequired, setAdvanced, setArgumentDisplayName, setDefaultValue, setHelpText, setRequired, valueToString |
trueStrings
protected static final java.lang.String[] trueStrings
falseStrings
protected static final java.lang.String[] falseStrings
BooleanArgumentDefinition
public BooleanArgumentDefinition(java.lang.String argumentName)
BooleanArgumentDefinition
public BooleanArgumentDefinition(java.lang.String argumentName,
java.lang.String help)
BooleanArgumentDefinition
public BooleanArgumentDefinition(java.lang.String argumentName,
boolean required,
java.lang.String help)
BooleanArgumentDefinition
public BooleanArgumentDefinition(java.lang.String argumentName,
boolean required,
java.lang.String help,
boolean defaultValue)
convertArgumentValue
public java.lang.Object convertArgumentValue(java.lang.String argumentValue)
throws ArgumentValidationException
- Try to parse the argument as a Double
- Specified by:
convertArgumentValue in interface CommandLineArgumentDefinition- Specified by:
convertArgumentValue in class BaseArgumentDefinitionImpl
- Parameters:
argumentValue -
- Returns:
- the argument as a Double
- Throws:
ArgumentValidationException - if the argument doesn't validate
getValueDescriptor
public java.lang.String getValueDescriptor()
- Description copied from interface:
CommandLineArgumentDefinition
- Return a String that will be used as a generic example for the value to be used
for this argument, in auto-generated usage
- Specified by:
getValueDescriptor in interface CommandLineArgumentDefinition- Overrides:
getValueDescriptor in class BaseArgumentDefinitionImpl
- Returns:
getValueFromGUIComponent
public java.lang.String getValueFromGUIComponent(javax.swing.JComponent component)
- Description copied from interface:
CommandLineArgumentDefinition
- Interrogate the GUI component used for this argument, to get its value. Most argument types will use
text fields, but not all (e.g., JComboBox for Boolean and Enumerated)
- Specified by:
getValueFromGUIComponent in interface CommandLineArgumentDefinition- Overrides:
getValueFromGUIComponent in class BaseArgumentDefinitionImpl
- Returns:
addComponentsForGUI
public javax.swing.JComponent addComponentsForGUI(java.awt.Container parent,
javax.swing.JDialog parentDialog,
java.lang.String defaultValue)
- Description copied from interface:
CommandLineArgumentDefinition
- Add GUI components for specifying this argument. Generally this will be a single field, but more complicated
components are allowed. The return value should be the component that will actually contain the user's
input. The components should be added directly to parent. If a dialog box needs to be opened, parentDialog
can be referenced. The initial value of the field, if any, is passed in -- no need for the component to
check the default
- Specified by:
addComponentsForGUI in interface CommandLineArgumentDefinition- Overrides:
addComponentsForGUI in class BaseArgumentDefinitionImpl
- Returns:
Fred Hutchinson Cancer Research Center