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

## Class draw2d.Port

    Object
       |
       +--draw2d.Figure
             |
             +--draw2d.Rectangle
                   |
                   +--draw2d.Port

Direct Known Subclasses:
  draw2d.OutputPort, draw2d.InputPort

class draw2d.Port
extends draw2d.Rectangle

A Port is the anchor for a draw2d.Connection. A draw2d.Connection must have a start and a end Port.
Version: 0.9.14
Author: Andreas Herz
Defined in Port.js

Field Summary
`Object` | `connectedUIRepresentation`
`Object` | `currentUIRepresentation`
`Object` | `disconnectedUIRepresentation`
`Object` | `hideIfConnected`
`Object` | `uiRepresentationAdded`

Constructor Summary
`draw2d.Port ( disconnectedUIRepresentation, connectedUIRepresentation)`

Method Summary
`void` | `attachMoveListener( <draw2d.Figure> figure)`
`void` | `detachMoveListener( <draw2d.Figure> figure)`
`draw2d.Point` | `getAbsoluteBounds()` Returns the absolute y-position of the port.
`draw2d.Point` | `getAbsolutePosition()` Returns the absolute y-position of the port.
`int` | `getAbsoluteX()` Returns the absolute x-position of the port.
`int` | `getAbsoluteY()` Returns the absolute y-position of the port.
`draw2d.Color` | `getBackgroundColor()` Returns the background color of this port.
`draw2d.Color` | `getColor()` Returns the foreground color of the port.
`draw2d.ArrayList` | `getConnections()` Returns a array of `Connection` of all related connections to this port.
`int` | `getCoronaWidth()` Returns the corona width of the Port.
`int` | `getLineWidth()` Returns the line with of the port border.
`String` | `getName()` Return the name of this port.
`draw2d.Node` | `getParent()` Return the parentNode draw2d.Node of this port.
`Object` | `isOver( iX , iY)`
`void` | `onOtherFigureMoved( <draw2d.Figure> figure)` Callback method of the movemoent of a figure
`void` | `setBackgroundColor( <draw2d.Color> color)` Set the background color of the port
`void` | `setColor( <draw2d.Color> color)` Set the foreground color of the port
`void` | `setCoronaWidth( <int> width)` Set the corona width of the Port.
`void` | `setDimension( <int> width, height)` Set the dimension of this port.
`void` | `setHideIfConnected( flag)` Hide the port if a connector has been attach to this.
`void` | `setLineWidth( width)` Set the foreground color of the port
`void` | `setName( <String> name)` Set the name of this port.
`void` | `setPosition( <int> xPos, <int> yPos)` Set the position of this port
`void` | `setUiRepresentation( <draw2d.Figure> figure)` Set the representation of this port.
`<static> void` | `setZOrderBaseIndex( <int> index)` Set the common z-index of the window element.

Methods inherited from class draw2d.Rectangle
`getWidth, getHeight`

Methods inherited from class draw2d.Figure
`getProperties, getProperty, setProperty, getId, getWorkflow, getZOrder, setZOrder, hasFixedPosition, getMinWidth, getMinHeight, setBorder, getContextMenu, onDoubleClick, onDragstart, setCanDrag, setAlpha, isResizeable, setResizeable, isSelectable, setSelectable, isStrechable, isDeleteable, setDeleteable, setCanSnapToHelper, getCanSnapToHelper, getSnapToGridAnchor, setSnapToGridAnchor, getBounds, getY, getX, onKeyDown, getPosition`

Field Detail

### connectedUIRepresentation

    Object connectedUIRepresentation

### currentUIRepresentation

    Object currentUIRepresentation

### disconnectedUIRepresentation

    Object disconnectedUIRepresentation

### hideIfConnected

    Object hideIfConnected

### uiRepresentationAdded

    Object uiRepresentationAdded

Constructor Detail

### draw2d.Port

    draw2d.Port( disconnectedUIRepresentation, connectedUIRepresentation)

Parameters:

`uiRepresentation` - The figure to paint this Port. This parameter is optional.

Version: 0.9.14
Author: Andreas Herz

Method Detail

### attachMoveListener

    void attachMoveListener( <draw2d.Figure> figure)

Parameters:

`figure` - The figure to monitor

### detachMoveListener

    void detachMoveListener( <draw2d.Figure> figure)

Parameters:

`figure` - The figure to remove the monitor

### getAbsoluteBounds

    draw2d.Point getAbsoluteBounds()

Returns the absolute y-position of the port.

### getAbsolutePosition

    draw2d.Point getAbsolutePosition()

Returns the absolute y-position of the port.

### getAbsoluteX

    int getAbsoluteX()

Returns the absolute x-position of the port.

### getAbsoluteY

    int getAbsoluteY()

Returns the absolute y-position of the port.

### getBackgroundColor

    draw2d.Color getBackgroundColor()

Returns the background color of this port.

### getColor

    draw2d.Color getColor()

Returns the foreground color of the port.

### getConnections

    draw2d.ArrayList getConnections()

Returns a array of `Connection` of all related connections to this port.

### getCoronaWidth

    int getCoronaWidth()

Returns the corona width of the Port. The corona width will be used during the drag&drop of a port.

### getLineWidth

    int getLineWidth()

Returns the line with of the port border.

### getName

    String getName()

Return the name of this port.

See:

- draw2d.Node.getPort()

### getParent

    draw2d.Node getParent()

Return the parentNode draw2d.Node of this port.

### isOver

    Object isOver( iX , iY)

### onOtherFigureMoved

    void onOtherFigureMoved( <draw2d.Figure> figure)

Callback method of the movemoent of a figure

Parameters:

`figure` - The figure which has been moved

See:

- draw2d.Figure.attachMoveListener()

### setBackgroundColor

    void setBackgroundColor( <draw2d.Color> color)

Set the background color of the port

Parameters:

`color` - The new background color of the port.

### setColor

    void setColor( <draw2d.Color> color)

Set the foreground color of the port

Parameters:

`color` - The new foreground color of the port.

### setCoronaWidth

    void setCoronaWidth( <int> width)

Set the corona width of the Port. The corona width will be used during the drag&drop of a port. You can drop a port in the corona of this port to create a connection. It is not neccessary to drop exactly on the port.

Parameters:

`width` - The new corona width of the port

### setDimension

    void setDimension( <int> width, height)

Set the dimension of this port.

Parameters:

`width` - The new width of the object

`heightThe` - new height of the object

### setHideIfConnected

    void setHideIfConnected( flag)

Hide the port if a connector has been attach to this. The port doesn't change the functonality. You can drag&drop the port. It hide's only the UI Representation!

### setLineWidth

    void setLineWidth( width)

Set the foreground color of the port

Parameters:

`color` - The new foreground color of the port.

### setName

    void setName( <String> name)

Set the name of this port.

Parameters:

`name` - The new name of this port.

See:

- draw2d.Node.getPort()

### setPosition

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

Set the position of this port

Parameters:

`xPos` - The new x position of the port.

`yPos` - The new y position of the port.

### setUiRepresentation

    void setUiRepresentation( <draw2d.Figure> figure)

Set the representation of this port. The default representation of a port is a green circle.

Parameters:

`figure` - The new UI representation of this port.

### setZOrderBaseIndex

    <static> void setZOrderBaseIndex( <int> index)

Set the common z-index of the window element. This method exists for compatibility reason to dojo or another UI javascript library. It is now possible to arange the draw2d elements behind/before other UI elements.

Parameters:

`index` - The z-order for all new port objects.

See:

- setZOrder

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