fr.ifremer.isisfish.ui.util
Class IsisAction
java.lang.Object
javax.swing.AbstractAction
fr.ifremer.isisfish.ui.util.IsisAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- BackupAction, CancelAction, ExportAction, IsisActionWithBackup
public abstract class IsisAction
- extends AbstractAction
- See Also:
- Serialized Form
|
Field Summary |
protected JDialog |
dialog
dialog source of the action (of null if none) |
protected boolean |
used
flag to say if something has been done in this action (is init in
prepare() method) |
| 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 |
used
protected boolean used
- flag to say if something has been done in this action (is init in
prepare() method)
dialog
protected JDialog dialog
- dialog source of the action (of
null if none)
IsisAction
protected IsisAction()
IsisAction
protected IsisAction(JDialog dialog)
actionPerformed
public void actionPerformed(ActionEvent e)
prepare
protected abstract boolean prepare()
- Prepare data for action, and find out if there is really something to
do here.
- Returns:
true if there is something to do here,
false otherwise
perform
protected abstract void perform(ActionEvent e)
- perform safelly action after
prepare() was invoked
This method is only called if used was true
- Parameters:
e - event source
finish
protected void finish()
- called inside
actionPerformed(java.awt.event.ActionEvent) after
perform(java.awt.event.ActionEvent) was invoked (so can't
be come here is nothing was to be done in this action.
needDispose
protected boolean needDispose()
- Returns:
true if we have to dispose dialog,
false otherwise
isUsed
public boolean isUsed()
- Returns:
true if something was done in the action performed,
false otherwise
Copyright © 1999-2010 CodeLutin. All Rights Reserved.