com.lowagie.tools.arguments

Class ToolArgument

public class ToolArgument extends Object implements ActionListener, PropertyChangeListener

This is an argument of one of the tools in the toolbox.
Field Summary
protected Stringclassname
type of the argument.
protected Stringdescription
describes the argument.
protected Stringname
short name for the argument.
VectorpropertyChangeListeners
protected AbstractTooltool
reference to the internal frame
protected Stringvalue
value of the argument.
Constructor Summary
ToolArgument()
Constructs a ToolArgument.
ToolArgument(AbstractTool tool, String name, String description, String classname)
Constructs a ToolArgument.
Method Summary
voidactionPerformed(ActionEvent e)
voidaddPropertyChangeListener(PropertyChangeListener l)
protected voidfirePropertyChange(PropertyChangeEvent evt)
ObjectgetArgument()
Gets the argument as an object.
StringgetClassname()
StringgetDescription()
StringgetName()
StringgetUsage()
Give you a String that can be used in a usage description.
StringgetValue()
voidpropertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.
voidremovePropertyChangeListener(PropertyChangeListener l)
voidsetClassname(String classname)
voidsetDescription(String description)
voidsetName(String name)
voidsetValue(String value)
voidsetValue(String value, String propertyname)

Field Detail

classname

protected String classname
type of the argument.

description

protected String description
describes the argument.

name

protected String name
short name for the argument.

propertyChangeListeners

transient Vector propertyChangeListeners

tool

protected AbstractTool tool
reference to the internal frame

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

actionPerformed

public void actionPerformed(ActionEvent e)

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

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

firePropertyChange

protected void firePropertyChange(PropertyChangeEvent evt)

getArgument

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

Returns: an object

Throws: InstantiationException

getClassname

public String getClassname()

Returns: Returns the classname.

getDescription

public String getDescription()

Returns: Returns the description.

getName

public String getName()

Returns: Returns the name.

getUsage

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

Returns: a String

getValue

public String getValue()

Returns: Returns the value.

propertyChange

public void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.

Parameters: evt A PropertyChangeEvent object describing the event source and the property that has changed.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

setClassname

public void setClassname(String classname)

Parameters: classname The classname to set.

setDescription

public void setDescription(String description)

Parameters: description The description to set.

setName

public void setName(String name)

Parameters: name The name to set.

setValue

public void setValue(String value)

Parameters: value The value to set.

setValue

public void setValue(String value, String propertyname)