Class StaticAnchor

    • Constructor Detail

      • 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 Detail

      • getReferencePosition

        public Point getReferencePosition()
        Returns the reference position of this StaticAnchor.
        Returns:
        The reference position of this StaticAnchor.
      • referencePositionProperty

        public javafx.beans.property.ObjectProperty<Point> referencePositionProperty()
        Returns the ObjectProperty that manages the reference position of this StaticAnchor.
        Returns:
        The ObjectProperty that manages the reference position of this StaticAnchor.
      • setReferencePosition

        public void setReferencePosition​(Point referencePosition)
        Sets the reference position of this StaticAnchor to the given value.
        Parameters:
        referencePosition - The new reference position for this StaticAnchor.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object