Interface UndoableOperation
- All Known Implementing Classes:
BulkUndoableOperation,CategoryAssignmentUndoableOperation,ItemChangeUndoableOperation,TestUndoableOperation
public interface UndoableOperation
Implementations of this interface represent operation that can be undone/re-done.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanRedo()Returns true is the operation can be redone.booleancanUndo()Returns true if the operation can be undone.A human readable description of the re-do operation (such as "Re-do edit").A human readable description of the undo operation (such as "Undo edit").voidredo()Redo the operation that has been undone.voidundo()Undo the operation.
-
Method Details
-
undo
Undo the operation.- Throws:
CannotUndoException- if the operation cannot be undone anymore- See Also:
-
canUndo
boolean canUndo()Returns true if the operation can be undone. May return false if in the meantime the object model is in a state that this operation cannot be made undone anymore.- Returns:
- true is the operation can be undone, false otherwise
-
redo
Redo the operation that has been undone.- Throws:
CannotRedoException- if the operation cannot be redone anymore- See Also:
-
canRedo
boolean canRedo()Returns true is the operation can be redone. May return false if in the meantime the object model is in a state that this operation cannot be made redone. Note that you don't have to keep track if the operation has been undone.- Returns:
- true is the operation can be redone, false otherwise
-
getUndoPresentationName
String getUndoPresentationName()A human readable description of the undo operation (such as "Undo edit").- Returns:
- human readable description of the undo operation (such as "Undo edit")
-
getRedoPresentationName
String getRedoPresentationName()A human readable description of the re-do operation (such as "Re-do edit").- Returns:
- human readable description of the re-do operation (such as "Re-do edit")
-
getUndoContextDescription
String getUndoContextDescription() -
getRedoContextDescription
String getRedoContextDescription()
-