public class GanttUndoRedoManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
STACK_SIZE |
| Constructor and Description |
|---|
GanttUndoRedoManager(GanttComposite parent,
int maxStackSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUndoRedoListener(IUndoRedoListener listener)
Adds a listener to be notified when undo/redo possibilities change
|
boolean |
canRedo()
Whether a Redo is possible.
|
boolean |
canUndo()
Whether an Undo is possible.
|
void |
clear()
Removes all undo/redo events from the stack
|
int |
getCurrentIndex()
The current index of where the undo/redo marker is
|
java.util.List |
getUndoRedoEvents() |
void |
record(IUndoRedoCommand command)
Records an undoable/redoable command
|
boolean |
redo()
Redoes the last GanttChart action.
|
void |
removeUndoRedoListener(IUndoRedoListener listener)
Removes a listener from being notified when undo/redo possibilities change
|
void |
setCurrentIndex(int currentIndex) |
void |
setMaxStackSize(int stackSize)
Sets a new max undo/redo sack size, value must be a positive integer or it is ignored.
|
boolean |
undo()
Undoes the last GanttChart action.
|
public static final int STACK_SIZE
public GanttUndoRedoManager(GanttComposite parent, int maxStackSize)
public java.util.List getUndoRedoEvents()
public void addUndoRedoListener(IUndoRedoListener listener)
listener - public void removeUndoRedoListener(IUndoRedoListener listener)
listener - public void record(IUndoRedoCommand command)
command - public void clear()
public boolean canUndo()
public boolean undo()
public boolean redo()
public boolean canRedo()
public int getCurrentIndex()
public void setCurrentIndex(int currentIndex)
currentIndex - The current index of where the undo/redo marker ispublic void setMaxStackSize(int stackSize)
stackSize - new max undo/redo stack size