java.lang.Object
com.lowagie.toolbox.arguments.AbstractArgument
com.lowagie.toolbox.arguments.FileArgument
- All Implemented Interfaces:
ActionListener,PropertyChangeListener,EventListener
FileArgument class if the argument is a java.io.File.
- Since:
- 2.1.1 (imported from itexttoolbox project)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileFiltera filter to put on the FileChooser.protected booleanindicates 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
ConstructorsConstructorDescriptionFileArgument(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
Modifier and TypeMethodDescriptionvoidGets the argument as an object.getLabel()voidsetFilter(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 Details
-
filter
a filter to put on the FileChooser. -
newFile
protected boolean newFileindicates if the argument has to point to a new or an existing file.
-
-
Constructor Details
-
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 argumentname- the name of the argumentdescription- the description of the argumentnewFile- makes the difference between an Open or Save dialogfilter- FileFilter
-
FileArgument
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 Details
-
getArgument
Gets the argument as an object.- Overrides:
getArgumentin classAbstractArgument- Returns:
- an object
- Throws:
InstantiationException- if the specified key cannot be compared with the keys currently in the map
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classAbstractArgument- Parameters:
e- ActionEvent- See Also:
-
getFilter
- Returns:
- Returns the filter.
-
setFilter
- Parameters:
filter- The filter to set.
-
getLabel
- Returns:
- Returns the label.
-
setLabel
- Parameters:
label- The label to set.
-