Package com.lowagie.toolbox.arguments
Class FileArgument
- java.lang.Object
-
- com.lowagie.toolbox.arguments.AbstractArgument
-
- com.lowagie.toolbox.arguments.FileArgument
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.beans.PropertyChangeListener,java.util.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
Fields Modifier and Type Field Description protected javax.swing.filechooser.FileFilterfiltera filter to put on the FileChooser.(package private) PdfInformationPanellabelthe labelprotected booleannewFileindicates 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
Constructors Constructor Description FileArgument()FileArgument(AbstractTool tool, java.lang.String name, java.lang.String description, boolean newFile)Constructs a FileArgument.FileArgument(AbstractTool tool, java.lang.String name, java.lang.String description, boolean newFile, javax.swing.filechooser.FileFilter filter)Constructs a FileArgument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)java.lang.ObjectgetArgument()Gets the argument as an object.javax.swing.filechooser.FileFiltergetFilter()PdfInformationPanelgetLabel()voidsetFilter(javax.swing.filechooser.FileFilter filter)voidsetLabel(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
-
-
-
-
Field Detail
-
filter
protected javax.swing.filechooser.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, java.lang.String name, java.lang.String description, boolean newFile, javax.swing.filechooser.FileFilter filter)
Constructs a FileArgument.- Parameters:
tool- the tool that needs this argumentname- the name of the argumentdescription- the description of the argumentnewFile- makes the difference between an Open or Save dialogfilter- FileFilter
-
FileArgument
public FileArgument(AbstractTool tool, java.lang.String name, java.lang.String description, boolean newFile)
Constructs a FileArgument.- Parameters:
tool- the tool that needs this argumentname- the name of the argumentdescription- the description of the argumentnewFile- makes the difference between an Open or Save dialog
-
-
Method Detail
-
getArgument
public java.lang.Object getArgument() throws java.lang.InstantiationExceptionGets the argument as an object.- Overrides:
getArgumentin classAbstractArgument- Returns:
- an object
- Throws:
java.lang.InstantiationException
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Specified by:
actionPerformedin classAbstractArgument- Parameters:
e- ActionEvent- See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)
-
getFilter
public javax.swing.filechooser.FileFilter getFilter()
- Returns:
- Returns the filter.
-
setFilter
public void setFilter(javax.swing.filechooser.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.
-
-