com.lowagie.rups.io

Class FileChooserAction

public class FileChooserAction extends AbstractAction

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 Filefile
The file that was chosen.
protected FileFilterfilter
A file filter to apply when browsing for a file.
protected booleannewFile
Indicates if you're browsing to create a new or an existing file.
protected Observableobservable
An object that is expecting the result of the file chooser action.
static longserialVersionUID
A serial version UID.
Constructor Summary
FileChooserAction(Observable observable, String caption, FileFilter filter, boolean newFile)
Creates a new file chooser action.
Method Summary
voidactionPerformed(ActionEvent evt)
FilegetFile()
Getter for the file.

Field Detail

file

protected File file
The file that was chosen.

filter

protected 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.

observable

protected Observable observable
An object that is expecting the result of the file chooser action.

serialVersionUID

private static final long serialVersionUID
A serial version UID.

Constructor Detail

FileChooserAction

public FileChooserAction(Observable observable, String caption, FileFilter filter, boolean newFile)
Creates a new file chooser action.

Parameters: observable the object waiting for you to select file caption a description for the action filter a filter to apply when browsing newFile indicates if you should browse for a new or existing file

Method Detail

actionPerformed

public void actionPerformed(ActionEvent evt)

See Also: java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)

getFile

public File getFile()
Getter for the file.