public class OptionArgument extends ToolArgument
| Modifier and Type | Class and Description |
|---|---|
class |
OptionArgument.Entry
An Entry that can be chosen as option.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.TreeMap |
options |
classname, description, name, propertyChangeListeners, tool, value| Constructor and Description |
|---|
OptionArgument(AbstractTool tool,
java.lang.String name,
java.lang.String description)
Constructs an OptionArgument.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
void |
addOption(java.lang.Object description,
java.lang.Object value)
Adds an Option.
|
java.lang.Object |
getArgument()
Gets the argument as an object.
|
java.lang.String |
getUsage()
Give you a String that can be used in a usage description.
|
addPropertyChangeListener, firePropertyChange, getClassname, getDescription, getName, getValue, propertyChange, removePropertyChangeListener, setClassname, setDescription, setName, setValuepublic OptionArgument(AbstractTool tool, java.lang.String name, java.lang.String description)
tool - the tool that needs this argumentname - the name of the argumentdescription - the description of the argumentpublic void addOption(java.lang.Object description,
java.lang.Object value)
description - the description of the optionvalue - the value of the optionpublic java.lang.Object getArgument()
throws java.lang.InstantiationException
getArgument in class ToolArgumentjava.lang.InstantiationExceptionpublic java.lang.String getUsage()
ToolArgumentgetUsage in class ToolArgumentToolArgument.getUsage()public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class ToolArgumentActionListener.actionPerformed(java.awt.event.ActionEvent)