jcreek.cke.command
Class RedoAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byjcreek.cke.command.RedoAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public class RedoAction
extends javax.swing.AbstractAction

Implements the redo action used to backout a recent change made to the graph.

Version:
Author:
See Also:
Serialized Form

Field Summary
protected  javax.swing.undo.UndoManager undo
          The undo manager we belong to.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
RedoAction()
          Creates a new RedoAction object with the default action command string of "redo".
RedoAction(javax.swing.undo.UndoManager undo)
          Creates a new RedoAction object with the default action command string of "redo".
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Performs the redo action.
 void setManager(javax.swing.undo.UndoManager undo)
          Sets the undo manager for this action to the one given.
 void update()
          Checks if we can redo an event or not and sets this action enabled appropriately.
 
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

undo

protected javax.swing.undo.UndoManager undo
The undo manager we belong to.

Constructor Detail

RedoAction

public RedoAction()
Creates a new RedoAction object with the default action command string of "redo". Sets the action initially disabled.


RedoAction

public RedoAction(javax.swing.undo.UndoManager undo)
Creates a new RedoAction object with the default action command string of "redo". Sets the action initially disabled.

Parameters:
undo - undo manager that tells us if we can be performed or not
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Performs the redo action.

Parameters:
e - action event

setManager

public void setManager(javax.swing.undo.UndoManager undo)
Sets the undo manager for this action to the one given.

Parameters:
undo - undo manager that tells us if we can be performed or not

update

public void update()
Checks if we can redo an event or not and sets this action enabled appropriately.



Created at IDI, NTNU by the Artificial Intelligence and Learning group