org.tigris.gef.base
Class UndoAction
java.lang.Object
javax.swing.AbstractAction
org.tigris.gef.base.UndoAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable
- public class UndoAction
- extends javax.swing.AbstractAction
- implements java.beans.PropertyChangeListener
An action to undo from the undo stack.
- See Also:
- Serialized Form
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(java.lang.String name)
Construct the undo action with a display name |
UndoAction(java.lang.String name,
javax.swing.Icon icon)
Construct the undo action with a display name and icon. |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
Perform the undo action. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
When the undo stack is down to zero we are disabled. |
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 |
UndoAction
public UndoAction(java.lang.String name)
- Construct the undo action with a display name
- Parameters:
name
-
UndoAction
public UndoAction(java.lang.String name,
javax.swing.Icon icon)
- Construct the undo action with a display name and icon.
- Parameters:
name
- icon
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Perform the undo action.
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- When the undo stack is down to zero we are disabled.
- Specified by:
propertyChange
in interface java.beans.PropertyChangeListener