public static class UndoRedo.Manager extends UndoManager implements UndoRedo
UndoRedo.Empty, UndoRedo.Manager, UndoRedo.Provider
edits
RedoName, UndoName
Constructor and Description |
---|
UndoRedo.Manager() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l)
Add a change listener.
|
void |
discardAllEdits()
Discard all the existing edits from the undomanager.
|
String |
getRedoPresentationName()
Get a human-presentable name describing the
redo operation.
|
String |
getUndoPresentationName()
Get a human-presentable name describing the
undo operation.
|
void |
redo()
Redo a previously undone edit.
|
void |
removeChangeListener(ChangeListener l)
Remove a change listener.
|
void |
undo()
Undo an edit.
|
void |
undoableEditHappened(UndoableEditEvent ue)
Consume an undoable edit.
|
void |
undoOrRedo() |
addEdit, canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getUndoOrRedoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoTo
die, getPresentationName, isInProgress, isSignificant, lastEdit
replaceEdit
public void undoableEditHappened(UndoableEditEvent ue)
undoableEditHappened
in interface UndoableEditListener
undoableEditHappened
in class UndoManager
ue
- the editpublic void discardAllEdits()
discardAllEdits
in class UndoManager
public void undo() throws CannotUndoException
UndoRedo
undo
in interface UndoableEdit
undo
in interface UndoRedo
undo
in class UndoManager
CannotUndoException
- if it failspublic void redo() throws CannotRedoException
UndoRedo
redo
in interface UndoableEdit
redo
in interface UndoRedo
redo
in class UndoManager
CannotRedoException
- if it failspublic void undoOrRedo() throws CannotRedoException, CannotUndoException
undoOrRedo
in class UndoManager
CannotRedoException
CannotUndoException
public void addChangeListener(ChangeListener l)
UndoRedo
addChangeListener
in interface UndoRedo
l
- the listener to addpublic void removeChangeListener(ChangeListener l)
UndoRedo
removeChangeListener
in interface UndoRedo
l
- the listener to removeUndoRedo.addChangeListener(javax.swing.event.ChangeListener)
public String getUndoPresentationName()
UndoRedo
getUndoPresentationName
in interface UndoableEdit
getUndoPresentationName
in interface UndoRedo
getUndoPresentationName
in class UndoManager
public String getRedoPresentationName()
UndoRedo
getRedoPresentationName
in interface UndoableEdit
getRedoPresentationName
in interface UndoRedo
getRedoPresentationName
in class UndoManager
Built on October 19 2013. | Portions Copyright 1997-2013 Sun Microsystems, Inc. All rights reserved.