com.lowagie.tools.arguments

Class FileArgument

public class FileArgument extends ToolArgument

ToolArgument class if the argument is a java.io.File.
Field Summary
FileFilterfilter
a filter to put on the FileChooser.
LabelAccessorylabel
the label
booleannewFile
indicates if the argument has to point to a new or an existing file.
Constructor Summary
FileArgument(AbstractTool tool, String name, String description, boolean newFile, FileFilter filter)
Constructs a FileArgument.
FileArgument(AbstractTool tool, String name, String description, boolean newFile)
Constructs a FileArgument.
Method Summary
voidactionPerformed(ActionEvent e)
ObjectgetArgument()
Gets the argument as an object.
FileFiltergetFilter()
LabelAccessorygetLabel()
voidsetFilter(FileFilter filter)
voidsetLabel(LabelAccessory label)

Field Detail

filter

private FileFilter filter
a filter to put on the FileChooser.

label

LabelAccessory label
the label

newFile

private boolean newFile
indicates if the argument has to point to a new or an existing file.

Constructor Detail

FileArgument

public FileArgument(AbstractTool tool, String name, String description, boolean newFile, FileFilter filter)
Constructs a FileArgument.

Parameters: tool the tool that needs this argument name the name of the argument description the description of the argument newFile makes the difference between an Open or Save dialog filter

FileArgument

public FileArgument(AbstractTool tool, String name, String description, boolean newFile)
Constructs a FileArgument.

Parameters: tool the tool that needs this argument name the name of the argument description the description of the argument newFile makes the difference between an Open or Save dialog

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)

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

getArgument

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

Returns: an object

Throws: InstantiationException

getFilter

public FileFilter getFilter()

Returns: Returns the filter.

getLabel

public LabelAccessory getLabel()

Returns: Returns the label.

setFilter

public void setFilter(FileFilter filter)

Parameters: filter The filter to set.

setLabel

public void setLabel(LabelAccessory label)

Parameters: label The label to set.