org.browsecode.helpers.undo
Class UndoHandler
java.lang.Object
org.browsecode.helpers.undo.UndoHandler
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.UndoableEditListener, HasMenus
public class UndoHandler
- extends java.lang.Object
- implements javax.swing.event.UndoableEditListener, HasMenus
For sample code, see TextComponentDemo
Note: do not add this to more than one MenuBarHelper -- it will only work correctly with one at a time.
Field Summary |
protected org.browsecode.helpers.undo.UndoHandler.RedoAction |
redoAction
|
protected org.browsecode.helpers.undo.UndoHandler.UndoAction |
undoAction
|
protected javax.swing.undo.UndoManager |
undoManager
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
undoAction
protected org.browsecode.helpers.undo.UndoHandler.UndoAction undoAction
redoAction
protected org.browsecode.helpers.undo.UndoHandler.RedoAction redoAction
undoManager
protected javax.swing.undo.UndoManager undoManager
UndoHandler
public UndoHandler()
getUndoAction
public javax.swing.Action getUndoAction()
getRedoAction
public javax.swing.Action getRedoAction()
setFirstTimeUndoWarning
public void setFirstTimeUndoWarning(java.lang.String s)
getFirstTimeUndoWarning
public java.lang.String getFirstTimeUndoWarning()
addUndoableEdit
public void addUndoableEdit(javax.swing.undo.UndoableEdit undoableEdit)
addUndoableEdit
public void addUndoableEdit(UndoableEdit2 edit)
undoableEditHappened
public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
- Specified by:
undoableEditHappened
in interface javax.swing.event.UndoableEditListener
addMenusTo
public void addMenusTo(MenuBarHelper menuBarHelper)
- Specified by:
addMenusTo
in interface HasMenus
addActiveListener
public void addActiveListener(HasMenus.ActiveListener listener)
- Specified by:
addActiveListener
in interface HasMenus
quit
public boolean quit()