be.ugent.caagt.swirl.actions
Class FileOpenAction
java.lang.Object
javax.swing.AbstractAction
be.ugent.caagt.swirl.actions.FileAction
be.ugent.caagt.swirl.actions.FileOpenAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public abstract class FileOpenAction
- extends FileAction
Abstract super class for actions that allow files to be loaded.
Clients should at least override openFile(java.io.File)
.
- See Also:
- Serialized Form
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 |
FileOpenAction(java.awt.Window parent,
boolean multipleAllowed,
javax.swing.filechooser.FileFilter... filters)
Create an action of this type |
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 |
FileOpenAction
public FileOpenAction(java.awt.Window parent,
boolean multipleAllowed,
javax.swing.filechooser.FileFilter... filters)
- Create an action of this type
- Parameters:
parent
- Parent window for the file chooser dialogmultipleAllowed
- Indicates whether the user is allowed to select
more than a single file at the timefilters
- File filters for the file chooser dialog
openFile
protected abstract void openFile(java.io.File file)
- Called for every file selected by the user. Must be overridden
by clients.
showDialog
protected int showDialog()
- Shows the file chooser open dialog.
- Specified by:
showDialog
in class FileAction
dialogApproved
public void dialogApproved()
- Invoke
openFile(java.io.File)
on all files chosen.
- Specified by:
dialogApproved
in class FileAction