|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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 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
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |