com.lowagie.tools.arguments
Class ToolArgument

java.lang.Object
  extended bycom.lowagie.tools.arguments.ToolArgument
All Implemented Interfaces:
ActionListener, EventListener
Direct Known Subclasses:
BitsetArgument, FileArgument, ImageArgument, OptionArgument

public class ToolArgument
extends Object
implements ActionListener

This is an argument of one of the tools in the toolbox.


Field Summary
protected  String classname
          type of the argument.
protected  String description
          describes the argument.
protected  String name
          short name for the argument.
protected  AbstractTool tool
          reference to the internal frame
protected  String value
          value of the argument.
 
Constructor Summary
ToolArgument()
          Constructs a ToolArgument.
ToolArgument(AbstractTool tool, String name, String description, String classname)
          Constructs a ToolArgument.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 Object getArgument()
          Gets the argument as an object.
 String getClassname()
           
 String getDescription()
           
 String getName()
           
 String getUsage()
          Give you a String that can be used in a usage description.
 String getValue()
           
 void setClassname(String classname)
           
 void setDescription(String description)
           
 void setName(String name)
           
 void setValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tool

protected AbstractTool tool
reference to the internal frame


description

protected String description
describes the argument.


name

protected String name
short name for the argument.


classname

protected String classname
type of the argument.


value

protected String value
value of the argument.

Constructor Detail

ToolArgument

public ToolArgument()
Constructs a ToolArgument.


ToolArgument

public ToolArgument(AbstractTool tool,
                    String name,
                    String description,
                    String classname)
Constructs a ToolArgument.

Parameters:
tool - the tool that needs this argument
name - the name of the argument
description - the description of the argument
classname - the type of the argument
Method Detail

getArgument

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

Returns:
an object
Throws:
InstantiationException

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

getUsage

public String getUsage()
Give you a String that can be used in a usage description.

Returns:
a String

getClassname

public String getClassname()
Returns:
Returns the classname.

setClassname

public void setClassname(String classname)
Parameters:
classname - The classname to set.

getDescription

public String getDescription()
Returns:
Returns the description.

setDescription

public void setDescription(String description)
Parameters:
description - The description to set.

getName

public String getName()
Returns:
Returns the name.

setName

public void setName(String name)
Parameters:
name - The name to set.

getValue

public String getValue()
Returns:
Returns the value.

setValue

public void setValue(String value)
Parameters:
value - The value to set.