Class PolyGraphAnchor

java.lang.Object
org.eclipse.draw2d.ConnectionAnchorBase
org.eclipse.draw2d.AbstractConnectionAnchor
org.csstudio.opibuilder.editparts.AbstractOpiBuilderAnchor
org.csstudio.opibuilder.editparts.PolyGraphAnchor
All Implemented Interfaces:
org.eclipse.draw2d.AncestorListener, org.eclipse.draw2d.ConnectionAnchor

public class PolyGraphAnchor extends AbstractOpiBuilderAnchor
This class represents an anchor on a polygon or polyline widget.

On a normal widget the there are just 8 possible positions for the connector, and they are all on the widget bounding box:

  • 4 are on the middle of each edge of the bounding box
  • 4 are on each corner of the bounding box
This is true even if the widget does not will its bounding box completely.

On a polyline or a polygon widget the anchors are wherever there is a bend in the polyline.

  • Constructor Details

    • PolyGraphAnchor

      public PolyGraphAnchor(org.eclipse.draw2d.Polyline owner, int pointIndex)
  • Method Details

    • getLocation

      public org.eclipse.draw2d.geometry.Point getLocation(org.eclipse.draw2d.geometry.Point reference)
    • getReferencePoint

      public org.eclipse.draw2d.geometry.Point getReferencePoint()
      Specified by:
      getReferencePoint in interface org.eclipse.draw2d.ConnectionAnchor
      Overrides:
      getReferencePoint in class org.eclipse.draw2d.AbstractConnectionAnchor
    • getOrientation

      Specified by:
      getOrientation in class AbstractOpiBuilderAnchor
      Returns:
      The direction in which the connection is oriented at this anchor, if the Manhattan router is being selected