Package com.lowagie.rups.io
Class FileChooserAction
java.lang.Object
javax.swing.AbstractAction
com.lowagie.rups.io.FileChooserAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
Allows you to browse the file system and forwards the file to the object that is waiting for you to choose a file.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected File
The file that was chosen.protected FileFilter
A file filter to apply when browsing for a file.protected boolean
Indicates if you're browsing to create a new or an existing file.protected Observable
An object that is expecting the result of the file chooser action.private static final long
A serial version UID.Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorsConstructorDescriptionFileChooserAction
(Observable observable, String caption, FileFilter filter, boolean newFile) Creates a new file chooser action. -
Method Summary
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDA serial version UID.- See Also:
-
observable
An object that is expecting the result of the file chooser action. -
filter
A file filter to apply when browsing for a file. -
newFile
protected boolean newFileIndicates if you're browsing to create a new or an existing file. -
file
The file that was chosen.
-
-
Constructor Details
-
FileChooserAction
Creates a new file chooser action.- Parameters:
observable
- the object waiting for you to select filecaption
- a description for the actionfilter
- a filter to apply when browsingnewFile
- indicates if you should browse for a new or existing file
-
-
Method Details
-
getFile
Getter for the file.- Returns:
- a file
-
actionPerformed
- See Also:
-