Runtime

## org.eclipse.gmf.runtime.draw2d.ui.figures
Class PolylineConnectionEx

    java.lang.Object
      org.eclipse.draw2d.Figure
          org.eclipse.draw2d.Shape
              org.eclipse.draw2d.AbstractPointListShape
                  org.eclipse.draw2d.Polyline
                      org.eclipse.draw2d.PolylineConnection
                          org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx

All Implemented Interfaces:
  AnchorListener, Connection, IFigure, IAnchorableFigure, IPolygonAnchorableFigure

    public class PolylineConnectionEx

extends PolylineConnection
implements IPolygonAnchorableFigure

This is an extension of the `PolylineConnection` class to support avoid obstructions, smoothness and jump-links behavior.

Nested Class Summary
`protected class` `PolylineConnectionEx.JumpLink` Inner class for storing the specific JumpLink information.
`protected class` `PolylineConnectionEx.JumpLinkSet` Inner class for storing the set of JumpLink's associated with the polyline connection.

Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
`Figure.FigureIterator, Figure.IdentitySearch`

Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
`IFigure.NoInsets`

Field Summary
`static int` `JUMPLINK_FLAG_ABOVE` Flag indicates whether the connection will attempt to "jump" other connection above it in the z-order.
`static int` `JUMPLINK_FLAG_ALL` Flag indicates whether the connection will attempt to "jump" all other connections regardless of z-order.
`static int` `JUMPLINK_FLAG_BELOW` Flag indicates whether the connection will attempt to "jump" other connection below it in the z-order.
`static int` `SMOOTH_LESS` Some smoothness
`static int` `SMOOTH_MORE` More exagerated smoothness
`static int` `SMOOTH_NONE` No smoothness
`static int` `SMOOTH_NORMAL` Normal smoothness

Fields inherited from class org.eclipse.draw2d.Shape
`lineStyle, lineWidth`

Fields inherited from class org.eclipse.draw2d.Figure
`bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip`

Fields inherited from interface org.eclipse.draw2d.Connection
`PROPERTY_CONNECTION_ROUTER, PROPERTY_POINTS`

Fields inherited from interface org.eclipse.draw2d.IFigure
`MAX_DIMENSION, MIN_DIMENSION, NO_INSETS`

Constructor Summary
`PolylineConnectionEx()`

Method Summary
`void` `addPoint(Point pt)` Add a point to the polyline connection.
`boolean` `containsPoint(int x, int y)` Determine if the polyline connection contains a given point.
`protected ConnectionAnchor` `createAnchor(PrecisionPoint p)` Creates a slidable anchor at the specified point (from the ratio of the reference's coordinates and bounds of the figure
`protected ConnectionAnchor` `createConnectionAnchor(Point p)` Returns a new anchor for this node figure.
`protected ConnectionAnchor` `createDefaultAnchor()` Creates the default Slidable anchor with a reference point at the center of the figure's bounds
`void` `dirtyAllJumpLinks()` Dirty all connection jump links in the diagram
`int` `findLineSegIndexOfPoint(int x, int y)` Calculate the line segment index for a given point.
`Rectangle` `getBounds()` Returns the bounds which holds all the points in this polyline connection.
`ConnectionAnchor` `getConnectionAnchor(java.lang.String terminal)` Given a string identifier, return the associated anchor for that identifier
`protected java.util.Hashtable` `getConnectionAnchors()` Returns the connectionAnchors.
`java.lang.String` `getConnectionAnchorTerminal(ConnectionAnchor c)` Dynamically allocates a new anchor if needed.
`Cursor` `getCursor()` Overriden to display special cursor when needed.
`PointList` `getPolygonPoints()` This method allows the implementing class to return a list of points that represent the polygon to be connected to.
`int` `getRoundedBendpointsRadius()` Returns the parameter indicating the arc radius for rounded bendpoints.
`PointList` `getRoundedCornersPoints(boolean calculateAppoxPoints)` Returns the list of points for this connection when rounded bendpoints option is selected.
`Rectangle` `getSimpleBounds()` Method getShallowBounds.
`protected double` `getSlidableAnchorArea()` Specifies how large the area of the figure's bounds where `SlidableAnchor` will be created.
`int` `getSmoothness()` Gets the smoothness factor.
`PointList` `getSmoothPoints()` See `getSmoothPoints(boolean calculateAppoxPoints)`
`PointList` `getSmoothPoints(boolean calculateAppox)` Returns points for this connection.
`ConnectionAnchor` `getSourceConnectionAnchorAt(Point p)` Gets the source connection anchor at a given point on the figure.
`protected RotatableDecoration` `getSourceDecoration()`
`ConnectionAnchor` `getTargetConnectionAnchorAt(Point p)` Gets the target connection anchor at a given point on the figure.
`protected RotatableDecoration` `getTargetDecoration()`
`void` `insertPoint(Point pt, int index)` Insert a point at the given index into the polyline connection.
`boolean` `isAvoidObstacleRouting()` Determines if this polyline connection is using avoid obstruction routing or not.
`boolean` `isClosestDistanceRouting()` Determines if this polyline connection is using closest distance routing or not.
`protected boolean` `isDefaultAnchorArea(PrecisionPoint p)` Checks whether the <PrecisionPoint> p which is a candidate for a relative reference for the `SlidableAnchor` belongs to the area where the default anchor must be created
`boolean` `isJumpLinksAngledIn()` Determines if the jump links are angled in or not.
`boolean` `isJumpLinksOnBottom()` Determines if the jump links are on the bottom of the polyline connection or not.
`boolean` `isJumpLinksSmooth()` Determines if the jump links are smooth or not.
`boolean` `isRoundingBendpoints()` Determines if the bendpoints should be rounded.
`protected void` `outlineShape(Graphics g)` Override the figure method "outlineShape" to draw the actual polyline connection shape.
`void` `refreshLine()` Provides a utility function for dirtying the jump links and repainting the line.
`void` `setForegroundColor(Color fg)`
`void` `setJumpLinks(boolean on)` Turns on or off the jump links functionality.
`void` `setJumpLinksStyles(int jumpType, boolean curved, boolean angleIn, boolean onBottom)` Set the jump links styles associated with the jump links functionality.
`void` `setLineDash(int[] dashes)` Sets the line dash style.
`void` `setLineWidth(int w)` Set the line width of the polyline connection.
`void` `setPoints(PointList points)` Sets the list of points to be used by this polyline connection.
`void` `setRoundedBendpointsRadius(int radius)` Sets the parameter indicating the arc radius for rounded bendpoints.
`void` `setRoutingStyles(boolean closestDistance, boolean avoidObstacles)` Set the overall routing styles for this polyline connection.
`void` `setSmoothness(int smooth)` Sets the smoothness factor of this Connection that is reflected when the polyline is rendered.
`void` `setSourceDecoration(RotatableDecoration dec)`
`void` `setSourceDecoration(RotatableDecoration dec, ConnectionLocator locator)` Sets the decoration to be used at the start of the `Connection`.
`void` `setTargetDecoration(RotatableDecoration dec)`
`void` `setTargetDecoration(RotatableDecoration dec, ConnectionLocator locator)` Sets the decoration to be used at the end of the `Connection`.
`boolean` `shouldJumpLinks()` Determines if this polyline connection should use the jump links methodology or not.

Methods inherited from class org.eclipse.draw2d.PolylineConnection
`addNotify, addRoutingListener, anchorMoved, getConnectionRouter, getRoutingConstraint, getSourceAnchor, getTargetAnchor, layout, removeNotify, removeRoutingListener, revalidate, setConnectionRouter, setRoutingConstraint, setSourceAnchor, setTargetAnchor`

Methods inherited from class org.eclipse.draw2d.Polyline
`fillShape, isOpaque, primTranslate, removeAllPoints, repaint, setTolerance, shapeContainsPoint`

Methods inherited from class org.eclipse.draw2d.AbstractPointListShape
`childrenContainsPoint, getEnd, getPoints, getStart, removePoint, setEnd, setEndpoints, setPoint, setStart`

Methods inherited from class org.eclipse.draw2d.Shape

`getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidthFloat, setOutline, setOutlineXOR, setXOR`

Methods inherited from class org.eclipse.draw2d.Figure

`add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getChildren, getClientArea, getClientArea, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, paint, paintBorder, paintChildren, paintClientArea, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, requestFocus, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.draw2d.Connection
`getPoints`

Methods inherited from interface org.eclipse.draw2d.IFigure

`add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getChildren, getClientArea, getClientArea, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, setBackgroundColor, setBorder, setBounds, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate`

Field Detail

### SMOOTH_NONE

    public static final int SMOOTH_NONE

  No smoothness

  See Also:
    Constant Field Values

### SMOOTH_LESS

    public static final int SMOOTH_LESS

  Some smoothness

  See Also:
    Constant Field Values

### SMOOTH_NORMAL

    public static final int SMOOTH_NORMAL

  Normal smoothness

  See Also:
    Constant Field Values

### SMOOTH_MORE

    public static final int SMOOTH_MORE

  More exagerated smoothness

  See Also:
    Constant Field Values

### JUMPLINK_FLAG_BELOW

    public static final int JUMPLINK_FLAG_BELOW

  Flag indicates whether the connection will attempt to "jump" other connection below it in the z-order.

  See Also:
    Constant Field Values

### JUMPLINK_FLAG_ABOVE

    public static final int JUMPLINK_FLAG_ABOVE

  Flag indicates whether the connection will attempt to "jump" other connection above it in the z-order.

  See Also:
    Constant Field Values

### JUMPLINK_FLAG_ALL

    public static final int JUMPLINK_FLAG_ALL

  Flag indicates whether the connection will attempt to "jump" all other connections regardless of z-order.

  See Also:
    Constant Field Values

Constructor Detail

### PolylineConnectionEx

    public PolylineConnectionEx()

Method Detail

### refreshLine

    public void refreshLine()

  Provides a utility function for dirtying the jump links and repainting the line.

### addPoint

    public void addPoint(Point pt)

  Add a point to the polyline connection.

  Overrides:
    `addPoint` in class `AbstractPointListShape`

### getBounds

    public Rectangle getBounds()

  Returns the bounds which holds all the points in this polyline connection. Returns any previously existing bounds, else calculates by unioning all the children's dimensions.

  Specified by:
    `getBounds` in interface `IFigure`
  Overrides:
    `getBounds` in class `PolylineConnection`
  Returns:
    Bounds to hold all the points.

### getSimpleBounds

    public Rectangle getSimpleBounds()

  Method getShallowBounds.

  Returns:
    Rectangle

### containsPoint

    public boolean containsPoint(int x,
                                 int y)

  Determine if the polyline connection contains a given point.

  Specified by:
    `containsPoint` in interface `IFigure`
  Overrides:
    `containsPoint` in class `Polyline`
  Parameters:
    `x` - int value of the point to check containment of
    `y` - int value of the point to check containment of.
  Returns:
    boolean true indicating containment, false otherwise.

### findLineSegIndexOfPoint

    public int findLineSegIndexOfPoint(int x,
                                       int y)

  Calculate the line segment index for a given point. This is important for the drag tracker that add's bendpoints on a connection.

  Parameters:
    `x` - the x value in relative coordinates
    `y` - the y value in relative coordinates
  Returns:
    the index of the line segment that is nearest to the given point.

### getSmoothPoints

    public PointList getSmoothPoints(boolean calculateAppox)

  Returns points for this connection. If the smooth factor is turned on, then calculate the approximated smooth polyline for display or other purposes. If bendpoints need to be rounded, calculates points taking that into account. In that case, if calculateAprox is true, it will also calculate points that approximate corner arcs. If it is false, it will replace each bendpoint with two points that represent start and end of an arc. In any case, calculated points are not persisted.

  Parameters:
    `calculateAppox` - If true, and rounding bendpoints is on, then calculate points that approximate bendpoint arc.
  Returns:
    Resulting `PointList`. In case when sooth factor is on, it is a polyline approximation of a bezier curve calculated based on the smoothness factor.
  Since:
    1.2

### getSmoothPoints

    public PointList getSmoothPoints()

  See `getSmoothPoints(boolean calculateAppoxPoints)`

### insertPoint

    public void insertPoint(Point pt,
                            int index)

  Insert a point at the given index into the polyline connection.

  Overrides:
    `insertPoint` in class `AbstractPointListShape`

### outlineShape

    protected void outlineShape(Graphics g)

  Override the figure method "outlineShape" to draw the actual polyline connection shape. Special code to regenerate the jumplinks, draw the polyline smooth, and round the bendpoints is also done during this method call.

  Overrides:
    `outlineShape` in class `Polyline`

### setLineWidth

    public void setLineWidth(int w)

  Set the line width of the polyline connection.

  Overrides:
    `setLineWidth` in class `Polyline`

### setPoints

    public void setPoints(PointList points)

  Sets the list of points to be used by this polyline connection. Removes any previously existing points.

  Specified by:
    `setPoints` in interface `Connection`
  Overrides:
    `setPoints` in class `Polyline`
  Parameters:
    `points` - New set of points.

### dirtyAllJumpLinks

    public void dirtyAllJumpLinks()

  Dirty all connection jump links in the diagram

### setSmoothness

    public final void setSmoothness(int smooth)

  Sets the smoothness factor of this Connection that is reflected when the polyline is rendered.

  Parameters:
    `smooth` - the value is one of SMOOTH_NONE - no smoothing, SMOOTH_LESS - rounded edges, SMOOTH_NORMAL - more curved look, SMOOTH_MORE - exagerated curving.

### getSmoothness

    public final int getSmoothness()

  Gets the smoothness factor.

  Returns:
    the value is one of SMOOTH_NONE - no smoothing, SMOOTH_LESS - rounded edges, SMOOTH_NORMAL - more curved look, SMOOTH_MORE - exagerated curving.

### isClosestDistanceRouting

    public final boolean isClosestDistanceRouting()

  Determines if this polyline connection is using closest distance routing or not.

  Returns:
    `boolean` `true` if it should be using closest distance routing, `false`

  ### isAvoidObstacleRouting

      public final boolean isAvoidObstacleRouting()

    Determines if this polyline connection is using avoid obstruction routing or not.

    Returns:
      `boolean` `true` if it should be using avoid obstruction routing, `false`

    ### setRoutingStyles

        public void setRoutingStyles(boolean closestDistance,
                                     boolean avoidObstacles)

      Set the overall routing styles for this polyline connection.

      Parameters:
        `closestDistance` - `boolean` `true` if it should be using closest distance routing, `false` `avoidObstacles` - `boolean` `true` if it should be using avoid obstruction routing, `false`

      ### isRoundingBendpoints

          public boolean isRoundingBendpoints()

        Determines if the bendpoints should be rounded. This option is available only when orthogonal router is used, and when smoothness is not selected.

        Returns:
          true if the option is selected and the current router is orthogonal
        Since:
          1.2

      ### setRoundedBendpointsRadius

          public void setRoundedBendpointsRadius(int radius)

        Sets the parameter indicating the arc radius for rounded bendpoints.

        Parameters:
          `radius` -
        Since:
          1.2

      ### getRoundedBendpointsRadius

          public int getRoundedBendpointsRadius()

        Returns the parameter indicating the arc radius for rounded bendpoints.

        Returns:
          the parameter indicating the arc radius for rounded bendpoints
        Since:
          1.2

      ### shouldJumpLinks

          public final boolean shouldJumpLinks()

        Determines if this polyline connection should use the jump links methodology or not.

        Returns:
          `boolean` `true` if this connection should support jump links, `false` otherwise.

      ### setJumpLinks

          public void setJumpLinks(boolean on)

        Turns on or off the jump links functionality.

        Parameters:
          `on` - the `boolean` `true` if this connection should support jump links, `false` otherwise.

      ### setJumpLinksStyles

          public void setJumpLinksStyles(int jumpType,
                                         boolean curved,
                                         boolean angleIn,
                                         boolean onBottom)

        Set the jump links styles associated with the jump links functionality.

        Parameters:
          `jumpType` - value can be one of `PolylineConnectionEx.JUMPLINK_FLAG_BELOW`, `PolylineConnectionEx.JUMPLINK_FLAG_ABOVE` or `PolylineConnectionEx.JUMPLINK_FLAG_ALL`
          `curved` - the `boolean` indicating if `true` the jump link should be curved (semi-circle) or if `false` it should be straight (rectangular).
          `angleIn` - the `boolean` if `true` indicating the sides of the jump link are angled or if `false` then the sides of the jump link are straight.
          `onBottom` - the `boolean` `true` it will be oriented on the bottom of the connection, `false` it will oriented on top.

      ### isJumpLinksSmooth

          public final boolean isJumpLinksSmooth()

        Determines if the jump links are smooth or not.

        Returns:
          `boolean` indicating if `true` the jump link should be curved (semi-circle) or if `false` it should be straight (rectangular).

      ### isJumpLinksAngledIn

          public final boolean isJumpLinksAngledIn()

        Determines if the jump links are angled in or not.

        Returns:
          `boolean` if `true` indicating the sides of the jump link are angled or if `false` then the sides of the jump link are straight.

      ### isJumpLinksOnBottom

          public final boolean isJumpLinksOnBottom()

        Determines if the jump links are on the bottom of the polyline connection or not.

        Returns:
          `boolean` `true` it will be oriented on the bottom of the connection, `false` it will oriented on top.

      ### getPolygonPoints

          public PointList getPolygonPoints()

        Description copied from interface: `IPolygonAnchorableFigure`
        This method allows the implementing class to return a list of points that represent the polygon to be connected to.

        Specified by:
          `getPolygonPoints` in interface `IPolygonAnchorableFigure`
        Returns:
          a list of points forming the polygon

      ### getConnectionAnchor

          public ConnectionAnchor getConnectionAnchor(java.lang.String terminal)

        Description copied from interface: `IAnchorableFigure`
        Given a string identifier, return the associated anchor for that identifier

        Specified by:
          `getConnectionAnchor` in interface `IAnchorableFigure`
        Parameters:
          `terminal` - `String` identifier associated with the anchor
        Returns:
          `ConnectionAnchor` that is associated with the given string.

      ### getConnectionAnchorTerminal

          public java.lang.String getConnectionAnchorTerminal(ConnectionAnchor c)

        Description copied from interface: `IAnchorableFigure`
        Dynamically allocates a new anchor if needed. Otherwise, recycles old anchors no longer in use.

        Specified by:
          `getConnectionAnchorTerminal` in interface `IAnchorableFigure`
        Parameters:
          `c` - the `ConnectionAnchor` reference to an anchor associated with the given point on the figure
        Returns:
          a `String` that represents the anchor identifier.

      ### getSourceConnectionAnchorAt

          public ConnectionAnchor getSourceConnectionAnchorAt(Point p)

        Description copied from interface: `IAnchorableFigure`
        Gets the source connection anchor at a given point on the figure.

        Specified by:
          `getSourceConnectionAnchorAt` in interface `IAnchorableFigure`
        Parameters:
          `p` - `Point` on the figure that gives a hint which anchor to return.
        Returns:
          a `ConnectionAnchor` reference to an anchor associated with the given point on the figure.

      ### getTargetConnectionAnchorAt

          public ConnectionAnchor getTargetConnectionAnchorAt(Point p)

        Description copied from interface: `IAnchorableFigure`
        Gets the target connection anchor at a given point on the figure.

        Specified by:
          `getTargetConnectionAnchorAt` in interface `IAnchorableFigure`
        Parameters:
          `p` - `Point` on the figure that gives a hint which anchor to return.
        Returns:
          `ConnectionAnchor` reference to an anchor associated with the given point on the figure.

      ### createDefaultAnchor

          protected ConnectionAnchor createDefaultAnchor()

        Creates the default Slidable anchor with a reference point at the center of the figure's bounds

        Returns:
          - default SlidableAnchor, relative reference the center of the figure

      ### createAnchor

          protected ConnectionAnchor createAnchor(PrecisionPoint p)

        Creates a slidable anchor at the specified point (from the ratio of the reference's coordinates and bounds of the figure

        Parameters:
          `p` - - relative reference for the `SlidableAnchor`
        Returns:
          a `SlidableAnchor` for this figure with relative reference at p

      ### createConnectionAnchor

          protected ConnectionAnchor createConnectionAnchor(Point p)

        Returns a new anchor for this node figure.

        Parameters:
          `p` - `Point` on the figure that gives a hint which anchor to return.
        Returns:
          `ConnectionAnchor` reference to an anchor associated with the given point on the figure.

      ### isDefaultAnchorArea

          protected boolean isDefaultAnchorArea(PrecisionPoint p)

        Checks whether the <PrecisionPoint> p which is a candidate for a relative reference for the `SlidableAnchor` belongs to the area where the default anchor must be created

        Parameters:
          `p` -
        Returns:
          `boolean` `true` if <PrecisionPoint> belongs to the area where the default anchor must be created, `false` otherwise

      ### getConnectionAnchors

          protected java.util.Hashtable getConnectionAnchors()

        Returns the connectionAnchors.

        Returns:
          Hashtable

      ### getSlidableAnchorArea

          protected double getSlidableAnchorArea()

        Specifies how large the area of the figure's bounds where `SlidableAnchor` will be created. The result number: 0<=result<=1

        Returns:
          the size of the area of the figure's bounds

      ### setForegroundColor

          public void setForegroundColor(Color fg)

        Specified by:
          `setForegroundColor` in interface `IFigure`
        Overrides:
          `setForegroundColor` in class `Figure`

      ### setSourceDecoration

          public void setSourceDecoration(RotatableDecoration dec,
                                          ConnectionLocator locator)

        Sets the decoration to be used at the start of the `Connection`.

        Parameters:
          `dec` - the new source decoration
          `locator` - the `ConnectionLocator` that allows placement of the source `RotableDecoration`.

      ### setTargetDecoration

          public void setTargetDecoration(RotatableDecoration dec,
                                          ConnectionLocator locator)

        Sets the decoration to be used at the end of the `Connection`.

        Parameters:
          `dec` - the new target decoration
          `locator` - the `ConnectionLocator` that allows placement of the target `RotableDecoration`.

      ### getTargetDecoration

          protected RotatableDecoration getTargetDecoration()

        Overrides:
          `getTargetDecoration` in class `PolylineConnection`
        Returns:
          the target decoration - possibly null

      ### getSourceDecoration

          protected RotatableDecoration getSourceDecoration()

        Overrides:
          `getSourceDecoration` in class `PolylineConnection`
        Returns:
          the source decoration - possibly null

      ### setTargetDecoration

          public void setTargetDecoration(RotatableDecoration dec)

        Overrides:
          `setTargetDecoration` in class `PolylineConnection`

      ### setSourceDecoration

          public void setSourceDecoration(RotatableDecoration dec)

        Overrides:
          `setSourceDecoration` in class `PolylineConnection`

      ### setLineDash

          public void setLineDash(int[] dashes)

        Sets the line dash style.

        Parameters:
          `dashes` - The dashes attribute.
        See Also:
          `LineAttributes.dash`

      ### getCursor

          public Cursor getCursor()

        Overriden to display special cursor when needed. Fix for bug #145467

        Specified by:
          `getCursor` in interface `IFigure`
        Overrides:
          `getCursor` in class `Figure`

      ### getRoundedCornersPoints

          public PointList getRoundedCornersPoints(boolean calculateAppoxPoints)

        Returns the list of points for this connection when rounded bendpoints option is selected. Each bendpoint in the result list is replaced by start and end points of the arc, and if calculateApproxPoints is true, it will also have arc approximation points in between.

        Parameters:
          `calculateAppoxPoints` - Indicates if arcs replacing bendpoints should be approximated
        Returns:
          List of connection points when rounded bendpoints option is on
        Since:
          1.2

      Runtime

      Guidelines for using Eclipse APIs.

      Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.