com.lowagie.toolbox.arguments

Class OptionArgument

public class OptionArgument extends AbstractArgument

Argument that can be one of several options.

Since: 2.1.1 (imported from itexttoolbox project)

Nested Class Summary
classOptionArgument.Entry
An Entry that can be chosen as option.
Field Summary
TreeMap<String,OptionArgument.Entry>options
Constructor Summary
OptionArgument(AbstractTool tool, String name, String description)
Constructs an OptionArgument.
Method Summary
voidactionPerformed(ActionEvent evt)
voidaddOption(Object description, Object value)
Adds an Option.
ObjectgetArgument()
Gets the argument as an object.
StringgetUsage()

Field Detail

options

private TreeMap<String,OptionArgument.Entry> options

Constructor Detail

OptionArgument

public OptionArgument(AbstractTool tool, String name, String description)
Constructs an OptionArgument.

Parameters: tool the tool that needs this argument name the name of the argument description the description of the argument

Method Detail

actionPerformed

public void actionPerformed(ActionEvent evt)

Parameters: evt ActionEvent

See Also: java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)

addOption

public void addOption(Object description, Object value)
Adds an Option.

Parameters: description the description of the option value the value of the option

getArgument

public Object getArgument()
Gets the argument as an object.

Returns: an object

Throws: InstantiationException

getUsage

public String getUsage()

Returns: String

See Also: StringArgument