Package 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
Argument that can be one of several options.
- Since:
- 2.1.1 (imported from itexttoolbox project)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
An Entry that can be chosen as option. -
Field Summary
FieldsFields inherited from class com.lowagie.toolbox.arguments.AbstractArgument
description, name, pcs, tool, value
-
Constructor Summary
ConstructorsConstructorDescriptionOptionArgument
(AbstractTool tool, String name, String description) Constructs an OptionArgument. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Adds an Option.Gets the argument as an object.getUsage()
Give you a String that can be used in a usage description.Methods inherited from class com.lowagie.toolbox.arguments.AbstractArgument
addPropertyChangeListener, firePropertyChange, getDescription, getName, getTool, getValue, propertyChange, removePropertyChangeListener, setDescription, setName, setTool, setValue, setValue, toString
-
Field Details
-
options
-
-
Constructor Details
-
OptionArgument
Constructs an OptionArgument.- Parameters:
tool
- the tool that needs this argumentname
- the name of the argumentdescription
- the description of the argument
-
-
Method Details
-
addOption
Adds an Option.- Parameters:
description
- the description of the optionvalue
- the value of the option
-
getArgument
Gets the argument as an object.- Overrides:
getArgument
in classAbstractArgument
- Returns:
- an object
- Throws:
InstantiationException
- if the specified key cannot be compared with the keys currently in the map
-
getUsage
Description copied from class:AbstractArgument
Give you a String that can be used in a usage description.- Overrides:
getUsage
in classAbstractArgument
- Returns:
- String
- See Also:
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
- Specified by:
actionPerformed
in classAbstractArgument
- Parameters:
evt
- ActionEvent- See Also:
-