Package com.lowagie.rups.io
Class FileChooserAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.lowagie.rups.io.FileChooserAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class FileChooserAction extends javax.swing.AbstractAction
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.File
file
The file that was chosen.protected javax.swing.filechooser.FileFilter
filter
A file filter to apply when browsing for a file.protected boolean
newFile
Indicates if you're browsing to create a new or an existing file.protected java.util.Observable
observable
An object that is expecting the result of the file chooser action.private static long
serialVersionUID
A serial version UID.
-
Constructor Summary
Constructors Constructor Description FileChooserAction(java.util.Observable observable, java.lang.String caption, javax.swing.filechooser.FileFilter filter, boolean newFile)
Creates a new file chooser action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent evt)
java.io.File
getFile()
Getter for the file.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
A serial version UID.- See Also:
- Constant Field Values
-
observable
protected java.util.Observable observable
An object that is expecting the result of the file chooser action.
-
filter
protected javax.swing.filechooser.FileFilter filter
A file filter to apply when browsing for a file.
-
newFile
protected boolean newFile
Indicates if you're browsing to create a new or an existing file.
-
file
protected java.io.File file
The file that was chosen.
-
-
Constructor Detail
-
FileChooserAction
public FileChooserAction(java.util.Observable observable, java.lang.String caption, javax.swing.filechooser.FileFilter filter, boolean newFile)
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
-
-