public class UndoManager
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Class and Description |
---|---|
static class |
UndoManager.Options |
Modifier and Type | Method and Description |
---|---|
void |
add(OperationBase operation)
Adds an undo operation to the stack and clears the redo stack.
|
void |
addAddHandler(UndoManagerAddHandler handler)
Add handler for when operation is added
|
void |
addChangeHandler(UndoManagerChangeHandler handler)
Add handler for when stack changes.
|
void |
addRedoHandler(UndoManagerRedoHandler handler)
Add handler for redo operation
|
void |
addUndoHandler(UndoManagerUndoHandler handler)
Add handler for undo operation
|
static boolean |
assertLoaded()
Check that the esri.undoManager has been loaded
|
boolean |
canRedo()
When true, there are redo operations available on the stack.
|
boolean |
canUndo()
When true, there are undo operations available on the stack
|
void |
clearRedo()
clear the redo stack
|
void |
clearUndo()
clear the undo stack
|
static UndoManager |
create(UndoManager.Options options)
Creates a new UndoManager object.
|
void |
destroy()
Destroy the operation manager.
|
OperationBase |
get(int operationId)
Get the specified operation from the stack.
|
int |
getLength()
The number of operations stored in the history stack.
|
OperationBase |
peekRedo()
Get the next redo operation from the stack
|
OperationBase |
peekUndo()
Get the next undo operation from the stack.
|
int |
position()
The current operation position.
|
void |
redo()
Moves the current position to the next redo operation and calls the operation's performRedo() method.
|
OperationBase |
remove(int operationId)
Remove the specified operation from the stack.
|
void |
undo()
Moves the current position to the next undo operation and calls the operation's performUndo method.
|
public static UndoManager create(UndoManager.Options options)
options
- public static boolean assertLoaded()
public final boolean canRedo()
public final boolean canUndo()
public final int getLength()
public final int position()
public final void add(OperationBase operation)
operation
- - operation to add.public final void clearRedo()
public final void clearUndo()
public final void destroy()
public final OperationBase get(int operationId)
operationId
- - the operation id.public final OperationBase peekRedo()
public final OperationBase peekUndo()
public final void redo()
public final OperationBase remove(int operationId)
operationId
- - the operation idpublic final void undo()
public final void addAddHandler(UndoManagerAddHandler handler)
handler
- - Fires when the add method is called to add an operation is added to the stack.public final void addChangeHandler(UndoManagerChangeHandler handler)
handler
- - Fires when the undo/redo stack changes.public final void addRedoHandler(UndoManagerRedoHandler handler)
handler
- - Fires when the redo method is called.public final void addUndoHandler(UndoManagerUndoHandler handler)
handler
- - Fires when the undo method is called.