public interface UndoManager
UndoableOperations. You add such an operation with addOperation(UndoableOperation) and it is
put on a stack. To perform the latest undo call undo(). The operation is then put on the re-do stack. To
re-do the latest undone operation call redo().| Modifier and Type | Method and Description |
|---|---|
void |
addOperation(UndoableOperation operation)
Puts an UndoableOperation on the stack.
|
boolean |
canRedo()
Returns true if there's an re-do operation and if the current re-do operation can be performed i.e its
UndoableOperation.canRedo() returns true. |
boolean |
canUndo()
Returns true if there's an undo operation and if the current undo operation can be performed, i.e its
UndoableOperation.canUndo() returns true. |
java.util.List<UndoableOperation> |
getRedoOperations()
Returns the re-do operations in the stack's order with the most recent first.
|
java.lang.String |
getRedoPresentationName()
Returns a human readable description of the most recent re-do operation
|
java.util.List<UndoableOperation> |
getUndoOperations()
Returns the undo operations in the stack's order with the most recent first.
|
java.lang.String |
getUndoPresentationName()
Returns a human readable description of the most recent undo operation
|
UndoableOperation |
peekRedoOperation()
Returns the latest re-do operation without performing it.
|
UndoableOperation |
peekUndoOperation()
Returns the latest undo operation without performing it.
|
void |
redo()
Re-does the last undo operation, removes it from the re-do stack and puts it on the undo stack.
|
void |
undo()
Undoes the latest operation.
|
void undo() throws CannotUndoException
CannotUndoException - if there is no UndoOperation or if the latest operation cannot be undoneboolean canUndo()
UndoableOperation.canUndo() returns true.void redo() throws CannotRedoException
CannotRedoException - if there is no re-do operation on the stack or the current re-do operation cannot be performedboolean canRedo()
UndoableOperation.canRedo() returns true.void addOperation(UndoableOperation operation)
operation - the UndoableOperation operation to be put on the stackUndoableOperation peekUndoOperation()
UndoableOperation peekRedoOperation()
java.util.List<UndoableOperation> getUndoOperations()
java.util.List<UndoableOperation> getRedoOperations()
java.lang.String getUndoPresentationName()
java.lang.String getRedoPresentationName()
Copyright © 2018 SAP SE. All Rights Reserved.