Interface UndoableOperation
-
- All Known Implementing Classes:
BulkUndoableOperation,CategoryAssignmentUndoableOperation,ItemChangeUndoableOperation,TestUndoableOperation
public interface UndoableOperationImplementations of this interface represent operation that can be undone/re-done.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanRedo()Returns true is the operation can be redone.booleancanUndo()Returns true if the operation can be undone.java.lang.StringgetRedoContextDescription()java.lang.StringgetRedoPresentationName()A human readable description of the re-do operation (such as "Re-do edit").java.lang.StringgetUndoContextDescription()java.lang.StringgetUndoPresentationName()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 Detail
-
undo
void undo() throws CannotUndoException
Undo the operation.- Throws:
CannotUndoException- if the operation cannot be undone anymore- See Also:
canUndo()
-
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
void redo() throws CannotRedoException
Redo the operation that has been undone.- Throws:
CannotRedoException- if the operation cannot be redone anymore- See Also:
canRedo()
-
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
java.lang.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
java.lang.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
java.lang.String getUndoContextDescription()
-
getRedoContextDescription
java.lang.String getRedoContextDescription()
-
-