edu.stanford.nlp.swing
Class MenuSavvyUndoManager
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
edu.stanford.nlp.swing.MenuSavvyUndoManager
- All Implemented Interfaces:
- EventListener, Serializable, UndoableEdit, UndoableEditListener
- public class MenuSavvyUndoManager
- extends UndoManager
UndoManager that maintains an undo and redo menu to the current undo state.
After an undoable action occurs, or an action is undone/redone, undo/redo
menus are updated with current text and set enabled/disabled as needed.
- Author:
- Joseph Smarr (jsmarr@stanford.edu) [taken from Summer 01 work at UCSD]
- See Also:
- Serialized Form
Methods inherited from class javax.swing.undo.UndoManager |
addEdit, canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoOrRedo, undoTo |
MenuSavvyUndoManager
public MenuSavvyUndoManager(JMenuItem undoMenuItem,
JMenuItem redoMenuItem)
undoableEditHappened
public void undoableEditHappened(UndoableEditEvent e)
undo
public void undo()
throws CannotUndoException
- Throws:
CannotUndoException
redo
public void redo()
throws CannotUndoException
- Throws:
CannotUndoException
discardAllEdits
public void discardAllEdits()
Stanford NLP Group