JHotDraw 7.0.9

org.jhotdraw.application.action
Class UndoAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jhotdraw.application.action.AbstractApplicationAction
          extended by org.jhotdraw.application.action.AbstractDocumentViewAction
              extended by org.jhotdraw.application.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 AbstractDocumentViewAction

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

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()
          Creates a new instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void installProjectListeners(DocumentView p)
          Installs listeners on the documentView object.
protected  void uninstallProjectListeners(DocumentView p)
          Installs listeners on the documentView object.
protected  void updateEnabledState()
           
protected  void updateProject(DocumentView oldValue, DocumentView newValue)
          Updates the listeners of this action depending on the current documentView of the application.
 
Methods inherited from class org.jhotdraw.application.action.AbstractDocumentViewAction
getCurrentView, getPropertyName, isEnabled, setEnabled, setPropertyName, updateEnabled, updateProperty
 
Methods inherited from class org.jhotdraw.application.action.AbstractApplicationAction
getApplication, getFrameworkResourceMap, getResourceMap, initActionProperties, initActionProperties, installApplicationListeners, uninstallApplicationListeners, updateApplicationEnabled
 
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()
Creates a new instance.

Method Detail

updateEnabledState

protected void updateEnabledState()

updateProject

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

Overrides:
updateProject in class AbstractDocumentViewAction

installProjectListeners

protected void installProjectListeners(DocumentView p)
Installs listeners on the documentView object.

Overrides:
installProjectListeners in class AbstractDocumentViewAction

uninstallProjectListeners

protected void uninstallProjectListeners(DocumentView p)
Installs listeners on the documentView object.

Overrides:
uninstallProjectListeners in class AbstractDocumentViewAction

actionPerformed

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

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