|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
be.ugent.caagt.swirl.actions.FileAction
public abstract class FileAction
Common (abstract) super class of FileOpenAction and
FileSaveAction. Clients should consider extending one of those
classes instead of this one.
| Field Summary | |
|---|---|
protected javax.swing.JFileChooser |
fileChooser
The file chooser which is used by this action. |
protected java.awt.Window |
parent
Parent window for any dialogs which need to be shown, in particular the file chooser dialog. |
| 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 | |
|---|---|
FileAction(java.awt.Window parent,
javax.swing.filechooser.FileFilter... filters)
Create an action of this type |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Shows the file chooser dialog and dispatches to the appropriate dialog... method depending on
the users choice |
protected javax.swing.JFileChooser |
createFileChooser()
Factory method which creates the file chooser at initialization time. |
protected abstract void |
dialogApproved()
Called when the dialog is approved. |
protected void |
dialogCanceled()
Called when the dialog is canceled. |
protected void |
dialogClosed()
Called when the dialog is dismissed. |
protected abstract int |
showDialog()
Shows the dialog appropriate for this type of file action |
| 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 javax.swing.JFileChooser fileChooser
protected java.awt.Window parent
| Constructor Detail |
|---|
public FileAction(java.awt.Window parent,
javax.swing.filechooser.FileFilter... filters)
parent - Window which will be used as parent for
all dialogsfilters - File filters for the file chooser dialog| Method Detail |
|---|
protected javax.swing.JFileChooser createFileChooser()
protected void dialogCanceled()
protected void dialogClosed()
dialogCanceled().
protected abstract void dialogApproved()
protected abstract int showDialog()
public void actionPerformed(java.awt.event.ActionEvent e)
dialog... method depending on
the users choice
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||