|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICommandStack
A command stack interface that can be used by a Gantt chart to execute, undo, and redo commands. Additionally the last executed (equals next undoable) command and the next redoable command can be queried from the stack.
Method Summary | |
---|---|
void |
addCommandStackListener(ICommandStackListener l)
Adds a listener to the command stack. |
void |
clear()
Clears the command stack's list of executed and undone commands. |
void |
execute(ICommand cmd,
IProgressMonitor monitor)
Executes the given command. |
ICommand |
getRedoableCommand()
Returns the command, which will be redone if the redo
method gets called. |
ICommand |
getUndoableCommand()
Returns the command, which will be undone if the undo
method gets called. |
boolean |
isRedoable()
Returns true if the command stack currently supports a call to it's redo method. |
boolean |
isUndoable()
Returns true if the command stack currently supports a call to it's undo method. |
void |
redo(IProgressMonitor monitor)
Redos the last undone command (if it is redoable). |
void |
removeCommandStackListener(ICommandStackListener l)
Removes a listener from the command stack. |
void |
undo(IProgressMonitor monitor)
Undos the last executed command (if it is undoable). |
Method Detail |
---|
void execute(ICommand cmd, IProgressMonitor monitor)
cmd
- the command to executemonitor
- a progress monitor used for displaying information during
command execution (for example: percentage complete, current
task, current subtask).void undo(IProgressMonitor monitor)
monitor
- a progress monitor used for displaying information during
command execution (for example: percentage complete, current
task, current subtask).void redo(IProgressMonitor monitor)
monitor
- a progress monitor used for displaying information during
command execution (for example: percentage complete, current
task, current subtask).void clear()
boolean isUndoable()
boolean isRedoable()
ICommand getUndoableCommand()
undo
method gets called. This method is useful for providing feedback to the
user via, for example, an undo menu item.
ICommand getRedoableCommand()
redo
method gets called. This method is useful for providing feedback to the
user via, for example, an undo menu item.
void addCommandStackListener(ICommandStackListener l)
l
- ICommandStackListenervoid removeCommandStackListener(ICommandStackListener l)
l
- ICommandStackListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |