Class AbstractOpiBuilderAnchor

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

public abstract class AbstractOpiBuilderAnchor extends org.eclipse.draw2d.AbstractConnectionAnchor
We have multiple implementations of the Anchor, and the FixedPointsConnectionRouter needs to know orientation in which the connector connects to the widget in order to correctly calculate the route. This becomes especially important once the widgets change positions (are animated) through some action.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    This enum tells in which direction a connector is connected to the widget

    Nested classes/interfaces inherited from interface org.eclipse.draw2d.AncestorListener

    org.eclipse.draw2d.AncestorListener.Stub
  • Field Summary

    Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase

    listeners
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractOpiBuilderAnchor(org.eclipse.draw2d.IFigure owner)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    fixZoomEdgeRounding(org.eclipse.draw2d.geometry.Point point, org.eclipse.draw2d.IFigure owner)
    In case of linking container zoom edge cases appear when linked OPI contains elements staring on point(0,0).
     

    Methods inherited from class org.eclipse.draw2d.AbstractConnectionAnchor

    addAnchorListener, ancestorAdded, ancestorMoved, ancestorRemoved, getOwner, getReferencePoint, removeAnchorListener, setOwner

    Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase

    fireAnchorMoved

    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.ConnectionAnchor

    getLocation
  • Constructor Details

    • AbstractOpiBuilderAnchor

      public AbstractOpiBuilderAnchor(org.eclipse.draw2d.IFigure owner)
  • Method Details

    • fixZoomEdgeRounding

      public static void fixZoomEdgeRounding(org.eclipse.draw2d.geometry.Point point, org.eclipse.draw2d.IFigure owner)

      In case of linking container zoom edge cases appear when linked OPI contains elements staring on point(0,0). When zooming some anchor points get out of linked container box. This causes broken connection, as anchor is no longer found.

      This is fixed by moving the anchor back into the bounds of linking container.

      Parameters:
      point - - reference to anchor point
      owner - - reference to the figure
    • getOrientation

      public abstract AbstractOpiBuilderAnchor.ConnectorOrientation getOrientation()
      Returns:
      The direction in which the connection is oriented at this anchor, if the Manhattan router is being selected