public static class UndoRedo.Manager extends UndoManager implements UndoRedo
UndoRedo.Empty, UndoRedo.Manager, UndoRedo.ProvidereditsRedoName, UndoName| Constructor and Description |
|---|
Manager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener l)
Add a change listener.
|
boolean |
addEdit(UndoableEdit anEdit) |
boolean |
canRedo()
Test whether the component currently has undone edits which may be redone.
|
boolean |
canUndo()
Test whether the component currently has edits which may be undone.
|
boolean |
canUndoOrRedo() |
void |
die() |
void |
discardAllEdits() |
protected UndoableEdit |
editToBeRedone() |
protected UndoableEdit |
editToBeUndone() |
void |
end() |
int |
getLimit() |
String |
getPresentationName() |
String |
getRedoPresentationName()
Get a human-presentable name describing the
redo operation.
|
String |
getUndoOrRedoPresentationName() |
String |
getUndoPresentationName()
Get a human-presentable name describing the
undo operation.
|
boolean |
isInProgress() |
boolean |
isSignificant() |
protected UndoableEdit |
lastEdit() |
void |
redo()
Redo a previously undone edit.
|
protected void |
redoTo(UndoableEdit edit) |
void |
removeChangeListener(ChangeListener l)
Remove a change listener.
|
boolean |
replaceEdit(UndoableEdit anEdit) |
void |
setLimit(int l) |
String |
toString() |
protected void |
trimEdits(int from,
int to) |
protected void |
trimForLimit() |
void |
undo()
Undo an edit.
|
void |
undoableEditHappened(UndoableEditEvent ue)
Consume an undoable edit.
|
void |
undoOrRedo() |
protected void |
undoTo(UndoableEdit edit) |
public void die()
die in interface UndoableEditdie in class CompoundEditpublic boolean isInProgress()
isInProgress in class CompoundEditpublic void end()
end in class UndoManagerpublic void undo()
throws CannotUndoException
UndoRedoundo in interface UndoableEditundo in interface UndoRedoundo in class UndoManagerCannotUndoException - if it failsprotected void undoTo(UndoableEdit edit) throws CannotUndoException
undoTo in class UndoManagerCannotUndoExceptionpublic boolean canUndo()
UndoRedocanUndo in interface UndoableEditcanUndo in interface UndoRedocanUndo in class UndoManagertrue if undo is allowedpublic void redo()
throws CannotRedoException
UndoRedoredo in interface UndoableEditredo in interface UndoRedoredo in class UndoManagerCannotRedoException - if it failsprotected void redoTo(UndoableEdit edit) throws CannotRedoException
redoTo in class UndoManagerCannotRedoExceptionpublic boolean canRedo()
UndoRedocanRedo in interface UndoableEditcanRedo in interface UndoRedocanRedo in class UndoManagertrue if redo is allowedpublic void undoOrRedo()
throws CannotRedoException,
CannotUndoException
undoOrRedo in class UndoManagerCannotRedoExceptionCannotUndoExceptionpublic boolean canUndoOrRedo()
canUndoOrRedo in class UndoManagerpublic int getLimit()
getLimit in class UndoManagerpublic void setLimit(int l)
setLimit in class UndoManagerprotected void trimForLimit()
trimForLimit in class UndoManagerprotected void trimEdits(int from,
int to)
trimEdits in class UndoManagerpublic void discardAllEdits()
discardAllEdits in class UndoManagerprotected UndoableEdit lastEdit()
lastEdit in class CompoundEditprotected UndoableEdit editToBeUndone()
editToBeUndone in class UndoManagerprotected UndoableEdit editToBeRedone()
editToBeRedone in class UndoManagerpublic void undoableEditHappened(UndoableEditEvent ue)
undoableEditHappened in interface UndoableEditListenerundoableEditHappened in class UndoManagerue - the editpublic boolean addEdit(UndoableEdit anEdit)
addEdit in interface UndoableEditaddEdit in class UndoManagerpublic boolean replaceEdit(UndoableEdit anEdit)
replaceEdit in interface UndoableEditreplaceEdit in class AbstractUndoableEditpublic boolean isSignificant()
isSignificant in interface UndoableEditisSignificant in class CompoundEditpublic String getPresentationName()
getPresentationName in interface UndoableEditgetPresentationName in class CompoundEditpublic String getUndoPresentationName()
UndoRedogetUndoPresentationName in interface UndoableEditgetUndoPresentationName in interface UndoRedogetUndoPresentationName in class UndoManagerpublic String getRedoPresentationName()
UndoRedogetRedoPresentationName in interface UndoableEditgetRedoPresentationName in interface UndoRedogetRedoPresentationName in class UndoManagerpublic String getUndoOrRedoPresentationName()
getUndoOrRedoPresentationName in class UndoManagerpublic String toString()
toString in class UndoManagerpublic void addChangeListener(ChangeListener l)
UndoRedoaddChangeListener in interface UndoRedol - the listener to addpublic void removeChangeListener(ChangeListener l)
UndoRedoremoveChangeListener in interface UndoRedol - the listener to removeUndoRedo.addChangeListener(javax.swing.event.ChangeListener)