sears.gui.undo
Class SearsUndoAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by sears.tools.SearsAction
          extended by sears.gui.undo.SearsUndoAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public abstract class SearsUndoAction
extends SearsAction

SearsUndoAction This is a generic undo/redoable action. It hardly save whole subtitles just before the actions and after. And creates a basic SearsUndoEdit that could restore old list.

See Also:
Serialized Form

Field Summary
 
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
SearsUndoAction(java.lang.String actionTag, SearsUndoManager undoManager)
          Constructor SearsUndoAction.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
abstract  boolean doUndoableAction(java.awt.event.ActionEvent e)
          Method doAction.
 
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
 

Constructor Detail

SearsUndoAction

public SearsUndoAction(java.lang.String actionTag,
                       SearsUndoManager undoManager)
Constructor SearsUndoAction.
Summary:
The constructor of the class SearsUndoAction

Parameters:
actionTag - The action tag off the action.
undoManager - The undoManager to be notified when this action happens.
Method Detail

actionPerformed

public final void actionPerformed(java.awt.event.ActionEvent e)

doUndoableAction

public abstract boolean doUndoableAction(java.awt.event.ActionEvent e)
Method doAction.
Summary:
Do the undoable action. Return true if action has been done, false otherwise, not to keep in undo/redo queue actions that failed.

Parameters:
e - The initial actionEvent.
Returns:
(boolean) Return true if action has been done, false otherwise.