simtools.diagram.undo
Class UndoHandler
java.lang.Object
simtools.diagram.undo.UndoHandler
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.UndoableEditListener
public class UndoHandler
- extends java.lang.Object
- implements javax.swing.event.UndoableEditListener
Instances of this class listen to UndoableEditEvent
s and
inform an instance of UndoManager
, in order for the edit to
be undone/redone.
- Author:
- Jean-Baptiste Lièvremont
Constructor Summary |
UndoHandler(javax.swing.undo.UndoManager undo)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_undo
protected javax.swing.undo.UndoManager _undo
_undoAction
protected UndoHandler.UndoAction _undoAction
_redoAction
protected UndoHandler.RedoAction _redoAction
UndoHandler
public UndoHandler(javax.swing.undo.UndoManager undo)
undoableEditHappened
public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
- Inform an
UndoManager
that an UndoableEditEvent
has happened and update the stats of related actions.
- Specified by:
undoableEditHappened
in interface javax.swing.event.UndoableEditListener
- See Also:
UndoableEditListener.undoableEditHappened(javax.swing.event.UndoableEditEvent)
getUndoAction
public UndoHandler.UndoAction getUndoAction()
- Get the
UndoAction
associated to this handler, and therefore
to a given DiagramComponent.
getRedoAction
public UndoHandler.RedoAction getRedoAction()
- Get the
RedoAction
associated to this handler, and therefore
to a given DiagramComponent.