public class DelayUndoManager
extends javax.swing.undo.UndoManager
Modifier and Type | Field and Description |
---|---|
protected javax.swing.Timer |
_timer |
Constructor and Description |
---|
DelayUndoManager() |
DelayUndoManager(int delay) |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(javax.swing.undo.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.
|
canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, undoTo
public DelayUndoManager()
public DelayUndoManager(int delay)
public boolean isCacheEmpty()
public void commitCache()
public void addEditWithoutCaching()
public void discardCache()
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
addEdit
in interface javax.swing.undo.UndoableEdit
addEdit
in class javax.swing.undo.UndoManager
public boolean canUndo()
canUndo
in interface javax.swing.undo.UndoableEdit
canUndo
in class javax.swing.undo.UndoManager
public boolean canRedo()
canRedo
in interface javax.swing.undo.UndoableEdit
canRedo
in class javax.swing.undo.UndoManager
public void undo() throws javax.swing.undo.CannotUndoException
undo
in interface javax.swing.undo.UndoableEdit
undo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotUndoException
public void redo() throws javax.swing.undo.CannotRedoException
redo
in interface javax.swing.undo.UndoableEdit
redo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotRedoException
public void discardAllEdits()
discardAllEdits
in class javax.swing.undo.UndoManager