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

## Class draw2d.CompartmentFigure

    Object
       |
       +--draw2d.Figure
             |
             +--draw2d.Node
                   |
                   +--draw2d.CompartmentFigure

class draw2d.CompartmentFigure
extends draw2d.Node

A CompartmentFigure is the base class for figures which can have children.
You can drag and drop any figure to a CompartmentFigure. At this moment the drag & drop figure is a child of the CompartmentFigure.
The CompartmentFigure is a container for other figures. It's a kind of grouping elements.
Version: 0.9.14
Author: Andreas Herz
Defined in CompartmentFigure.js

Constructor Summary
`draw2d.CompartmentFigure ()`

Method Summary
`void` | `addChild( <draw2d.Figure> figure)` Add the hands over element to this compartment figure.
`Object` | `getChildren()` Returns the children of this container figure.
`void` | `onFigureDrop( <draw2d.Figure> figure)` Sub class can override this method to reset the highlight or do other stuff.
`void` | `onFigureEnter( <draw2d.Figure> figure)` Sub class can override this method to reset the highlight or do other stuff. Don't forget to call the super method via `Figure.prototype.onFigureEnter.call(this,figure)` if you inherit
`void` | `removeChild( <draw2d.Figure> figure)` Remove the hands over figure from this compartment figure.
`void` | `setPosition( <int> xPos , <int> yPos )` Set the new position of the object
`void` | `setZOrder( <int> index)`

Methods inherited from class draw2d.Node
`getPorts, getPort, addPort, removePort, setBackgroundColor, getBackgroundColor, setColor, setLineWidth`

Methods inherited from class draw2d.Figure
`getProperties, getProperty, setProperty, getId, getWorkflow, getParent, getZOrder, hasFixedPosition, getMinWidth, getMinHeight, setBorder, getContextMenu, onDoubleClick, onMouseEnter, onMouseLeave, onDragstart, setCanDrag, setAlpha, setDimension, isResizeable, setResizeable, isSelectable, setSelectable, isStrechable, isDeleteable, setDeleteable, setCanSnapToHelper, getCanSnapToHelper, getSnapToGridAnchor, setSnapToGridAnchor, getBounds, getWidth, getHeight, getY, getX, getAbsoluteY, getAbsoluteX, onKeyDown, getPosition, isOver, attachMoveListener, detachMoveListener`

Constructor Detail

### draw2d.CompartmentFigure

    draw2d.CompartmentFigure()

Version: 0.9.14
Author: Andreas Herz

Method Detail

### addChild

    void addChild( <draw2d.Figure> figure)

Add the hands over element to this compartment figure. This is a kind of grouping elements

Parameters:

`figure` - The new figure to add.

### getChildren

    Object getChildren()

Returns the children of this container figure.

Returns:

draw2d.ArrayList

### onFigureDrop

    void onFigureDrop( <draw2d.Figure> figure)

Sub class can override this method to reset the highlight or do other stuff.

Parameters:

`figure` - The current drag drop figure.

### onFigureEnter

    void onFigureEnter( <draw2d.Figure> figure)

Sub class can override this method to reset the highlight or do other stuff.
Don't forget to call the super method via `Figure.prototype.onFigureEnter.call(this,figure)` if you inherit

Parameters:

`figure` - The current drag drop figure.

### removeChild

    void removeChild( <draw2d.Figure> figure)

Remove the hands over figure from this compartment figure. This method does NOT remove the figure from the cnavas. It only remove the figure in child hirachie of this compartment.

Parameters:

`figure` - The figure to remove.

### setPosition

    void setPosition( <int> xPos , <int> yPos )

Set the new position of the object

Parameters:

`xPos` - The new x coordinate of the figure

`yPos` - The new y coordinate of the figure

### setZOrder

    void setZOrder( <int> index)

Parameters:

`index` - Set the new z-index of the element

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