Serializable
, EventListener
, UndoableEditListener
, UndoableEdit
public class DelayUndoManager extends UndoManager
Modifier and Type | Field | Description |
---|---|---|
protected Timer |
_timer |
RedoName, UndoName
edits
Constructor | Description |
---|---|
DelayUndoManager() |
|
DelayUndoManager(int delay) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addEdit(UndoableEdit anEdit) |
|
void |
addEditWithoutCaching() |
Calls super.addEdit without caching.
|
boolean |
canRedo() |
Override to commit the cache before checking redo status.
|
boolean |
canUndo() |
Override to commit the cache before checking undo status.
|
void |
commitCache() |
Commits the cached edit.
|
void |
discardAllEdits() |
|
void |
discardCache() |
|
boolean |
isCacheEmpty() |
Checks if there are pending edits in the DelayUndoManager.
|
void |
redo() |
Override to commit the cache before redo.
|
void |
undo() |
Override to commit the cache before undo.
|
replaceEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, undoTo
protected Timer _timer
public DelayUndoManager()
public DelayUndoManager(int delay)
public boolean isCacheEmpty()
public void commitCache()
public void addEditWithoutCaching()
public void discardCache()
public boolean addEdit(UndoableEdit anEdit)
addEdit
in interface UndoableEdit
addEdit
in class UndoManager
public boolean canUndo()
canUndo
in interface UndoableEdit
canUndo
in class UndoManager
public boolean canRedo()
canRedo
in interface UndoableEdit
canRedo
in class UndoManager
public void undo() throws CannotUndoException
undo
in interface UndoableEdit
undo
in class UndoManager
CannotUndoException
public void redo() throws CannotRedoException
redo
in interface UndoableEdit
redo
in class UndoManager
CannotRedoException
public void discardAllEdits()
discardAllEdits
in class UndoManager