|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
com.jidesoft.swing.DelayUndoManager
public class DelayUndoManager
An undo manager that aggregates UndoableEdits into one CompoundEdit if they are executed very close to each other. By default, the gap is 500 ms. You can control it by passing in a different number in the constructor.
| Field Summary | |
|---|---|
protected Timer |
_timer
|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
DelayUndoManager()
|
|
DelayUndoManager(int delay)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class javax.swing.undo.UndoManager |
|---|
canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, undoTo |
| Methods inherited from class javax.swing.undo.CompoundEdit |
|---|
die, getPresentationName, isInProgress, isSignificant, lastEdit |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
replaceEdit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Timer _timer
| Constructor Detail |
|---|
public DelayUndoManager()
public DelayUndoManager(int delay)
| Method Detail |
|---|
public boolean isCacheEmpty()
public void commitCache()
public void addEditWithoutCaching()
public void discardCache()
public boolean addEdit(UndoableEdit anEdit)
addEdit in interface UndoableEditaddEdit in class UndoManagerpublic boolean canUndo()
canUndo in interface UndoableEditcanUndo in class UndoManagerpublic boolean canRedo()
canRedo in interface UndoableEditcanRedo in class UndoManager
public void undo()
throws CannotUndoException
undo in interface UndoableEditundo in class UndoManagerCannotUndoException
public void redo()
throws CannotRedoException
redo in interface UndoableEditredo in class UndoManagerCannotRedoExceptionpublic void discardAllEdits()
discardAllEdits in class UndoManager
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||