public class UndoTools
extends java.lang.Object
| Constructor and Description |
|---|
UndoTools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addOperationAndEventInternal(UndoManager undoManager,
UndoableOperation operation,
java.lang.Object eventSource) |
static void |
addUndoOperationAndEvent(UndoManager undoManager,
UndoableOperation operation,
java.lang.Object eventSource)
Adds the given operation to the undo stack and sends global undo event.
|
static void |
discardUndoGrouping()
Discards undo grouping without adding any undo operations to undo manager.
|
static java.util.List<UndoableOperation> |
getGroupedOperations()
Returns list of currently grouped operations (See
startUndoGrouping()). |
static boolean |
isItemValid(TypedObject typedObject) |
static void |
redo(UndoManager undoManager,
UndoableOperation operation)
Performs re-do of all operation from the top of the stack to the given one.
|
static void |
startUndoGrouping()
Starts grouping of undo-able operations.
|
static void |
stopUndoGrouping(UndoManager undoManager,
java.lang.Object eventSource)
Stops the grouping of undo-able operations.
|
static void |
stopUndoGrouping(UndoManager undoManager,
java.lang.Object eventSource,
BulkUndoableOperation bulk) |
static void |
undo(UndoManager undoManager,
UndoableOperation operation)
Performs undo of all operation from the top of the stack to the given one.
|
public static void undo(UndoManager undoManager, UndoableOperation operation) throws CannotUndoException
undoManager - the undo manageroperation - the operationCannotUndoException - when one of the operations throws itpublic static void redo(UndoManager undoManager, UndoableOperation operation) throws CannotRedoException
undoManager - the undo manageroperation - the operationCannotRedoException - when one of the operations throws itpublic static void addUndoOperationAndEvent(UndoManager undoManager, UndoableOperation operation, java.lang.Object eventSource)
undoManager - the undo manageroperation - the operation to be addedeventSource - the object to be used as source of the undo eventpublic static void startUndoGrouping()
stopUndoGrouping(UndoManager um, Object eventSource). Calling it
the group sill be added to the undo manager stack as one bulk operation. Note: the grouping is per thread.public static void stopUndoGrouping(UndoManager undoManager, java.lang.Object eventSource)
startUndoGrouping() for more details about operation grouping and how to start it. Note:
the grouping is per thread.undoManager - the undo managereventSource - the object to be used as source of undo eventstartUndoGrouping()public static void stopUndoGrouping(UndoManager undoManager, java.lang.Object eventSource, BulkUndoableOperation bulk)
public static java.util.List<UndoableOperation> getGroupedOperations()
startUndoGrouping()).public static void discardUndoGrouping()
public static void addOperationAndEventInternal(UndoManager undoManager, UndoableOperation operation, java.lang.Object eventSource)
public static boolean isItemValid(TypedObject typedObject)
Copyright © 2018 SAP SE. All Rights Reserved.