|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--draw2d.CommandStack
Defined in CommandStack.js
Version: 0.9.14
Author: Andreas Herz
| Field Summary | |
<static> Object |
POST_EXECUTE
Constant indicating notification after a command has been executed (value is 8). |
<static> Object |
POST_MASK
|
<static> Object |
POST_REDO
Constant indicating notification after a command has been redone (value is 16). |
<static> Object |
POST_UNDO
Constant indicating notification after a command has been undone (value is 32). |
<static> Object |
PRE_EXECUTE
Constant indicating notification prior to executing a command (value is 1). |
<static> Object |
PRE_MASK
|
<static> Object |
PRE_REDO
Constant indicating notification prior to redoing a command (value is 2). |
<static> Object |
PRE_UNDO
Constant indicating notification prior to undoing a command (value is 4). |
| Constructor Summary | |
draw2d.CommandStack
()
|
|
| Method Summary | |
void
|
addCommandStackEventListener( <draw2d.CommandStackListener> listener)
Adds a listener to the command stack, which will be notified whenever a command has been processed on the stack. |
boolean
|
canRedo()
|
boolean
|
canUndo()
|
void
|
execute( <draw2d.Command> command)
Executes the specified Command if possible. |
void
|
markSaveLocation()
Remove the undo / redo history. |
void
|
notifyListeners( <draw2d.Command> command, <int> state)
Notifies command stack event listeners that the command stack has changed to the specified state. |
void
|
redo()
Redo the command after the user has undo this command |
void
|
removeCommandStackEventListener( <draw2d.CommandStackListener> listener)
Removes a listener from the command stack. |
void
|
setUndoLimit( <int> count)
Set the maximal undo stack size. |
void
|
undo()
Undo the command |
| Field Detail |
<static> Object POST_EXECUTE
<static> Object POST_MASK
<static> Object POST_REDO
<static> Object POST_UNDO
<static> Object PRE_EXECUTE
<static> Object PRE_MASK
<static> Object PRE_REDO
<static> Object PRE_UNDO
| Constructor Detail |
draw2d.CommandStack()
| Method Detail |
void addCommandStackEventListener( <draw2d.CommandStackListener> listener)
listener - the listener to add.
boolean canRedo()
true if it is appropriate to call ().
boolean canUndo()
true if () can be called
void execute( <draw2d.Command> command)
command - The command to execute.
void markSaveLocation()
void notifyListeners( <draw2d.Command> command, <int> state)
command - the command
state - the current stack state
void redo()
void removeCommandStackEventListener( <draw2d.CommandStackListener> listener)
listener - the listener to remove.
void setUndoLimit( <int> count)
count - The maximal undo stack size.
void undo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||