|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractAction com.lowagie.rups.io.FileChooserAction
public class FileChooserAction
Allows you to browse the file system and forwards the file to the object that is waiting for you to choose a file.
Field Summary | |
---|---|
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. |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
FileChooserAction(java.util.Observable observable,
java.lang.String caption,
javax.swing.filechooser.FileFilter filter,
boolean newFile)
Creates a new file chooser action. |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Observable observable
protected javax.swing.filechooser.FileFilter filter
protected boolean newFile
protected java.io.File file
Constructor Detail |
---|
public FileChooserAction(java.util.Observable observable, java.lang.String caption, javax.swing.filechooser.FileFilter filter, boolean newFile)
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 fileMethod Detail |
---|
public java.io.File getFile()
public void actionPerformed(java.awt.event.ActionEvent evt)
ActionListener.actionPerformed(java.awt.event.ActionEvent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |