com.lowagie.toolbox.arguments
Class FileArgument

java.lang.Object
  extended by com.lowagie.toolbox.arguments.AbstractArgument
      extended by com.lowagie.toolbox.arguments.FileArgument
All Implemented Interfaces:
ActionListener, PropertyChangeListener, EventListener

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  FileFilter filter
          a filter to put on the FileChooser.
(package private)  PdfInformationPanel label
          the label
protected  boolean newFile
          indicates if the argument has to point to a new or an existing file.
 
Fields inherited from class com.lowagie.toolbox.arguments.AbstractArgument
description, name, pcs, tool, value
 
Constructor Summary
FileArgument()
           
FileArgument(AbstractTool tool, String name, String description, boolean newFile)
          Constructs a FileArgument.
FileArgument(AbstractTool tool, String name, String description, boolean newFile, FileFilter filter)
          Constructs a FileArgument.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 Object getArgument()
          Gets the argument as an object.
 FileFilter getFilter()
           
 PdfInformationPanel getLabel()
           
 void setFilter(FileFilter filter)
           
 void setLabel(PdfInformationPanel label)
           
 
Methods inherited from class com.lowagie.toolbox.arguments.AbstractArgument
addPropertyChangeListener, firePropertyChange, getDescription, getName, getTool, getUsage, getValue, propertyChange, removePropertyChangeListener, setDescription, setName, setTool, setValue, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filter

protected FileFilter filter
a filter to put on the FileChooser.


newFile

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


label

PdfInformationPanel label
the label

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

getArgument

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

Overrides:
getArgument in class AbstractArgument
Returns:
an object
Throws:
InstantiationException

actionPerformed

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

getFilter

public FileFilter getFilter()
Returns:
Returns the filter.

setFilter

public void setFilter(FileFilter filter)
Parameters:
filter - The filter to set.

getLabel

public PdfInformationPanel getLabel()
Returns:
Returns the label.

setLabel

public void setLabel(PdfInformationPanel label)
Parameters:
label - The label to set.

Hosted by Hostbasket