fr.ifremer.isisfish.ui.util
Class IsisAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by 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 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
protected IsisAction()
           
protected IsisAction(JDialog dialog)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
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.
 boolean isUsed()
           
protected  boolean needDispose()
           
protected abstract  void perform(ActionEvent e)
          perform safelly action after prepare() was invoked This method is only called if used was true
protected abstract  boolean prepare()
          Prepare data for action, and find out if there is really something to do here.
 
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

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)

Constructor Detail

IsisAction

protected IsisAction()

IsisAction

protected IsisAction(JDialog dialog)
Method Detail

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-2012 CodeLutin. All Rights Reserved.