com.itextpdf.rups.io
Class FileChooserAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.itextpdf.rups.io.FileChooserAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

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.

See Also:
Serialized Form

Field Summary
protected  File file
          The file that was chosen.
protected  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  Observable observable
          An object that is expecting the result of the file chooser action.
private static long serialVersionUID
          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, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
FileChooserAction(Observable observable, String caption, FileFilter filter, boolean newFile)
          Creates a new file chooser action.
 
Method Summary
 void actionPerformed(ActionEvent evt)
           
 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

observable

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


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.


file

protected File file
The file that was chosen.


serialVersionUID

private static final long serialVersionUID
A serial version UID.

See Also:
Constant Field Values
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

getFile

public File getFile()
Getter for the file.


actionPerformed

public void actionPerformed(ActionEvent evt)
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

Hosted by Hostbasket