com.lowagie.toolbox.arguments
Class OptionArgument
java.lang.Object
com.lowagie.toolbox.arguments.AbstractArgument
com.lowagie.toolbox.arguments.OptionArgument
- All Implemented Interfaces:
- ActionListener, PropertyChangeListener, EventListener
- Direct Known Subclasses:
- PageSizeArgument
public class OptionArgument
- extends AbstractArgument
Argument that can be one of several options.
- Since:
- 2.1.1 (imported from itexttoolbox project)
Methods inherited from class com.lowagie.toolbox.arguments.AbstractArgument |
addPropertyChangeListener, firePropertyChange, getDescription, getName, getTool, getValue, propertyChange, removePropertyChangeListener, setDescription, setName, setTool, setValue, setValue, toString |
options
private TreeMap<String,OptionArgument.Entry> options
OptionArgument
public OptionArgument(AbstractTool tool,
String name,
String description)
- Constructs an OptionArgument.
- Parameters:
tool
- the tool that needs this argumentname
- the name of the argumentdescription
- the description of the argument
addOption
public void addOption(Object description,
Object value)
- Adds an Option.
- Parameters:
description
- the description of the optionvalue
- the value of the option
getArgument
public Object getArgument()
throws InstantiationException
- Gets the argument as an object.
- Overrides:
getArgument
in class AbstractArgument
- Returns:
- an object
- Throws:
InstantiationException
getUsage
public String getUsage()
- Description copied from class:
AbstractArgument
- Give you a String that can be used in a usage description.
- Overrides:
getUsage
in class AbstractArgument
- Returns:
- String
- See Also:
AbstractArgument.getUsage()
actionPerformed
public void actionPerformed(ActionEvent evt)
- Specified by:
actionPerformed
in interface ActionListener
- Specified by:
actionPerformed
in class AbstractArgument
- Parameters:
evt
- ActionEvent- See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)