Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class draw2d.Command

    Object
       |
       +--draw2d.Command

Direct Known Subclasses:
  draw2d.CommandMove, draw2d.CommandResize, draw2d.CommandSetText, draw2d.CommandConnect, draw2d.CommandAdd, draw2d.CommandMoveLine, draw2d.CommandSetBackgroundColor, draw2d.CommandDelete, draw2d.CommandSetColor, draw2d.CommandReconnect

class draw2d.Command

Defined in Command.js
Version: 0.9.14
Author: Andreas Herz

Field Summary
`Object` | `label`

Constructor Summary
`draw2d.Command ( label)` Base class for the undo redo support in the Open-jACOB Draw2d framework.

Method Summary
`boolean` | `canExecute()` Returns [true] if the command can be execute and the execution of the command modifies the model.
`void` | `execute()` Execute the command the first time.
`void` | `getLabel()` Returns a label of the Command.
`void` | `redo()` Redo the command after the user has undo this command.
`void` | `undo()` Undo the command.

Field Detail

### label

    Object label

Constructor Detail

### draw2d.Command

    draw2d.Command( label)

Base class for the undo redo support in the Open-jACOB Draw2d framework.

Version: 0.9.14
Author: Andreas Herz

Method Detail

### canExecute

    boolean canExecute()

Returns [true] if the command can be execute and the execution of the command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should return false. Rhe execution of this Command doesn't modify the model.

### execute

    void execute()

Execute the command the first time. Sup-classes must implement this method.

### getLabel

    void getLabel()

Returns a label of the Command. e.g. "move figure".

### redo

    void redo()

Redo the command after the user has undo this command. Sup-classes must implement this method.

### undo

    void undo()

Undo the command. Sup-classes must implement this method.

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Feb 7 23:45:47 2008