Interface IAnchor

  • All Known Implementing Classes:
    AbstractAnchor, AbstractRouter.VolatileStaticAnchor, DynamicAnchor, StaticAnchor

    public interface IAnchor
    An IAnchor is a visual anchor that will provide positions for attached AnchorKeys (i.e. anchored Nodes) in local coordinates of the AnchorKey's anchored Node.

    The position for each attached Node will be recomputed in case the attached Node or any of its ancestors are changed in a way that has an effect on the position being provided for the attached Node. The positionsUnmodifiableProperty() will be updated accordingly, it may be monitored for changes.

    An IAnchor may be bound to an anchorage Node. If this is the case, positions for all attached Nodes will also be recomputed in case the anchorage Node or any of its ancestors are changed in a way that will have an effect on the position of the attached Node.

    • Method Detail

      • anchorageProperty

        javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> anchorageProperty()
        Provides a read-only property with the anchorage Node this IAnchor is bound to. The property value may be null in case this IAnchor is not bound to an anchorage Node.
        Returns:
        A read-only property storing the anchorage Node.
      • getPositionsUnmodifiable

        javafx.collections.ObservableMap<AnchorKey,​Point> getPositionsUnmodifiable()
        Provides an observable read-only (map) with positions (in local coordinates of the anchored Nodes) for all attached AnchorKeys. The positions will be updated for all attached AnchorKeys if the attached Nodes or the anchorage Node, the IAnchor is bound to, or any of their ancestors changes in a way that will effect the positions (within the local coordinate space of the attached Nodes).
        Returns:
        A read-only observable map storing positions for all attached AnchorKeys.
      • isAttached

        boolean isAttached​(AnchorKey key)
        Determines if the given AnchorKey is currently attached to this IAnchor.
        Parameters:
        key - The AnchorKey to test.
        Returns:
        true if the given key is attached, otherwise false.
      • positionsUnmodifiableProperty

        javafx.beans.property.ReadOnlyMapProperty<AnchorKey,​Point> positionsUnmodifiableProperty()
        Provides a read-only (map) property with positions (in local coordinates of the anchored Nodes) for all attached AnchorKeys. The positions will be updated for all attached AnchorKeys if the attached Nodes or the anchorage Node, the IAnchor is bound to, or any of their ancestors changes in a way that will effect the positions (within the local coordinate space of the attached Nodes).
        Returns:
        A read-only (map) property storing positions for all attached AnchorKeys.