com.lowagie.toolbox.arguments

Class FileArgument

public class FileArgument extends AbstractArgument

FileArgument class if the argument is a java.io.File.

Since: 2.1.1 (imported from itexttoolbox project)

Field Summary
protected FileFilterfilter
a filter to put on the FileChooser.
PdfInformationPanellabel
the label
protected booleannewFile
indicates if the argument has to point to a new or an existing file.
Constructor Summary
FileArgument()
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()
PdfInformationPanelgetLabel()
voidsetFilter(FileFilter filter)
voidsetLabel(PdfInformationPanel label)

Field Detail

filter

protected FileFilter filter
a filter to put on the FileChooser.

label

PdfInformationPanel label
the label

newFile

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

Constructor Detail

FileArgument

public FileArgument()

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 FileFilter

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)

Parameters: e ActionEvent

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 PdfInformationPanel getLabel()

Returns: Returns the label.

setFilter

public void setFilter(FileFilter filter)

Parameters: filter The filter to set.

setLabel

public void setLabel(PdfInformationPanel label)

Parameters: label The label to set.