JHotDraw 7.0.9

org.jhotdraw.app.action
Class UndoAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jhotdraw.app.action.AbstractProjectAction
          extended by org.jhotdraw.app.action.UndoAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class UndoAction
extends AbstractProjectAction

Undoes the last user action. In order to work, this action requires that the Project returns a project specific undo action when invoking getAction("undo") on the Project.

Version:
2.0 2006-06-15 Reworked.
1.0 October 9, 2005 Created.
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
static java.lang.String ID
           
 
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
UndoAction(Application app)
          Creates a new instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void installProjectListeners(Project p)
          Installs listeners on the project object.
protected  void uninstallProjectListeners(Project p)
          Installs listeners on the project object.
protected  void updateEnabledState()
           
protected  void updateProject(Project oldValue, Project newValue)
          Updates the listeners of this action depending on the current project of the application.
 
Methods inherited from class org.jhotdraw.app.action.AbstractProjectAction
getApplication, getCurrentProject, getPropertyName, isEnabled, setEnabled, setPropertyName, updateEnabled, updateProperty
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

UndoAction

public UndoAction(Application app)
Creates a new instance.

Method Detail

updateEnabledState

protected void updateEnabledState()

updateProject

protected void updateProject(Project oldValue,
                             Project newValue)
Description copied from class: AbstractProjectAction
Updates the listeners of this action depending on the current project of the application.

Overrides:
updateProject in class AbstractProjectAction

installProjectListeners

protected void installProjectListeners(Project p)
Installs listeners on the project object.

Overrides:
installProjectListeners in class AbstractProjectAction

uninstallProjectListeners

protected void uninstallProjectListeners(Project p)
Installs listeners on the project object.

Overrides:
uninstallProjectListeners in class AbstractProjectAction

actionPerformed

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

Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.