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

## Class draw2d.Connection

    Object
       |
       +--draw2d.Line
             |
             +--draw2d.Connection

class draw2d.Connection
extends draw2d.Line

A Connection is the line between two draw2d.Ports.
Version: 0.9.14
Author: Andreas Herz
Defined in Connection.js

Field Summary
`Object` | `children`
`<static> Object` | `defaultRouter`

Fields inherited from class draw2d.Line
`zOrder`

Constructor Summary
`draw2d.Connection ()`

Method Summary
`void` | `addFigure( <draw2d.Figure> figure, <draw2d.ConnectionLocator> locator)` Add a child figure to the Connection.
`void` | `addPoint( p)`
`boolean` | `containsPoint( <int> px, <int> py)` Checks if the hands over coordinate hits the line.
`void` | `finishStroke()`
`Object` | `getEndAngle()`
`draw2d.Point` | `getEndPoint()` Return the recalculated position of the start point if we have set an anchor.
`draw2d.ArrayList` | `getPoints()` Returns the fulcrms of the connection
`draw2d.ConnectionRouter` | `getRouter()` Return the current active router of this connection.
`draw2d.Port` | `getSource()` Returns the source port of this connection.
`Object` | `getStartAngle()`
`draw2d.Point` | `getStartPoint()` Return the recalculated position of the start point if we have set an anchor.
`draw2d.Port` | `getTarget()` Returns the target port of this connection.
`boolean` | `isResizeable()` You can't drag&drop the resize handles of a connector.
`void` | `setRouter( router)` Set the ConnectionRouter for this object.
`void` | `setSource( <draw2d.Port> port)` Set the new source port of this connection.
`void` | `setSourceAnchor( anchor)` Set the ConnectionAnchor for this object.
`void` | `setSourceDecorator( decorator)` Set the ConnectionDecorator for this object.
`void` | `setTarget( <draw2d.Port> port)` Set the target port of this connection.
`void` | `setTargetAnchor( anchor)` Set the ConnectionAnchor for this object.
`void` | `setTargetDecorator( decorator)` Set the ConnectionDecorator for this object.
`void` | `startStroke()`
`<static> void` | `setDefaultRouter( router)`

Methods inherited from class draw2d.Line
`getZOrder, setZOrder, getWorkflow, attachMoveListener, detachMoveListener, setLineWidth, setColor, getColor, setAlpha, setStartPoint, setEndPoint, getStartX, getStartY, getEndX, getEndY, isSelectable, setSelectable, isDeleteable, setDeleteable, getLength, getAngle, getContextMenu, onDoubleClick`

Field Detail

### children

    Object children

### defaultRouter

    <static> Object defaultRouter

Constructor Detail

### draw2d.Connection

    draw2d.Connection()

Version: 0.9.14
Author: Andreas Herz

Method Detail

### addFigure

    void addFigure( <draw2d.Figure> figure, <draw2d.ConnectionLocator> locator)

Add a child figure to the Connection. The hands over figure doesn't support drag&drop operations.

Parameters:

`figure` - the figure to add as decoration to the connection.

`locator` - the locator for the child.

### addPoint

    void addPoint( p)

### containsPoint

    boolean containsPoint( <int> px, <int> py)

Checks if the hands over coordinate hits the line.

Parameters:

`px` - the x coordinate of the test point

`py` - the y coordinate of the test point

### finishStroke

    void finishStroke()

### getEndAngle

    Object getEndAngle()

### getEndPoint

    draw2d.Point getEndPoint()

Return the recalculated position of the start point if we have set an anchor.

### getPoints

    draw2d.ArrayList getPoints()

Returns the fulcrms of the connection

Returns:

an draw2d.ArrayList of type draw2d.Point

### getRouter

    draw2d.ConnectionRouter getRouter()

Return the current active router of this connection.

### getSource

    draw2d.Port getSource()

Returns the source port of this connection.

### getStartAngle

    Object getStartAngle()

### getStartPoint

    draw2d.Point getStartPoint()

Return the recalculated position of the start point if we have set an anchor.

### getTarget

    draw2d.Port getTarget()

Returns the target port of this connection.

### isResizeable

    boolean isResizeable()

You can't drag&drop the resize handles of a connector.

### setRouter

    void setRouter( router)

Set the ConnectionRouter for this object.

### setSource

    void setSource( <draw2d.Port> port)

Set the new source port of this connection. This enforce a repaint of the connection.

Parameters:

`port` - The new source port of this connection.

### setSourceAnchor

    void setSourceAnchor( anchor)

Set the ConnectionAnchor for this object.

### setSourceDecorator

    void setSourceDecorator( decorator)

Set the ConnectionDecorator for this object.

### setTarget

    void setTarget( <draw2d.Port> port)

Set the target port of this connection. This enforce a repaint of the connection.

Parameters:

`port` - The new target port of this connection

### setTargetAnchor

    void setTargetAnchor( anchor)

Set the ConnectionAnchor for this object.

### setTargetDecorator

    void setTargetDecorator( decorator)

Set the ConnectionDecorator for this object.

### startStroke

    void startStroke()

### setDefaultRouter

    <static> void setDefaultRouter( router)

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