Class StaticAnchor

java.lang.Object
org.eclipse.gef.fx.anchors.AbstractAnchor
org.eclipse.gef.fx.anchors.StaticAnchor
All Implemented Interfaces:
IAnchor
Direct Known Subclasses:
AbstractRouter.VolatileStaticAnchor

public class StaticAnchor extends AbstractAnchor
An StaticAnchor provides a position for each AnchorKey, based on a reference position relative to the anchorage Node, to which the StaticAnchor is bound, or based on a (global) static reference position in case the StaticAnchor is unbound.
  • Property Details

  • Constructor Details

    • StaticAnchor

      public StaticAnchor(javafx.scene.Node anchorage, Point referencePositionInAnchorageLocal)
      Creates an StaticAnchor that is bound to the provided anchorage. It will used the passed in reference position (in the local coordinate system of the anchorage Node) to compute positions (see AbstractAnchor.positionsUnmodifiableProperty()) for all attached AnchorKeys (in the local coordinate system of the attached AnchorKey's Node ).

      In case the anchorage Node or any of its ancestors are changed in a way that will affect the position, the AbstractAnchor.positionsUnmodifiableProperty() will be updated.

      Parameters:
      anchorage - The anchorage Node to bind this StaticAnchor to.
      referencePositionInAnchorageLocal - The position within the local coordinate space of the anchorage Node, which is used to compute the position (in scene coordinates) for all attached AnchorKeys.
    • StaticAnchor

      public StaticAnchor(Point referencePositionInScene)
      Creates an StaticAnchor that is not bound to an anchorage Node and will always provide the passed in position (in scene coordinates) for all attached AnchorKeys (i.e. anchored Nodes).
      Parameters:
      referencePositionInScene - The position in scene coordinates to be provided for all attached AnchorKeys.
  • Method Details