Package org.eclipse.gef.fx.anchors
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.
-
Property Summary
Properties -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node>Provides a read-only property with the anchorageNodethisIAnchoris bound to.voidvoidjavafx.scene.NodeProvides the anchorageNodethisIAnchoris bound to.getPosition(AnchorKey key) Provides a position for the givenAnchorKey.Provides an observable read-only (map) with positions (in local coordinates of the anchoredNodes) for all attachedAnchorKeys.booleanisAttached(AnchorKey key) Provides a read-only (map) property with positions (in local coordinates of the anchoredNodes) for all attachedAnchorKeys.
-
Property Details
-
anchorage
javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> anchoragePropertyProvides a read-only property with the anchorageNodethisIAnchoris bound to. The property value may benullin case thisIAnchoris not bound to an anchorageNode.- See Also:
-
positionsUnmodifiable
Provides a read-only (map) property with positions (in local coordinates of the anchoredNodes) for all attachedAnchorKeys. The positions will be updated for all attachedAnchorKeys if the attachedNodes or the anchorageNode, theIAnchoris bound to, or any of their ancestors changes in a way that will effect the positions (within the local coordinate space of the attachedNodes).- See Also:
-
-
Method Details
-
anchorageProperty
javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> anchorageProperty()Provides a read-only property with the anchorageNodethisIAnchoris bound to. The property value may benullin case thisIAnchoris not bound to an anchorageNode.- See Also:
-
attach
- Parameters:
key- TheAnchorKeyto be attached.
-
detach
- Parameters:
key- TheAnchorKeyto be detached.
-
getAnchorage
javafx.scene.Node getAnchorage()Provides the anchorageNodethisIAnchoris bound to. Will return the value of theanchorageProperty().- Returns:
- The value of the
anchorageProperty().
-
getPosition
Provides a position for the givenAnchorKey. The providedAnchorKeyhas to be attached to thisIAnchor(seeattach(AnchorKey)).- Parameters:
key- TheAnchorKeyto retrieve a position for. It has to be attached (attach(AnchorKey)) to thisIAnchorbefore.- Returns:
- The position for the given
AnchorKeywithin local coordinates of theAnchorKey's anchoredNode.
-
getPositionsUnmodifiable
Provides an observable read-only (map) with positions (in local coordinates of the anchoredNodes) for all attachedAnchorKeys. The positions will be updated for all attachedAnchorKeys if the attachedNodes or the anchorageNode, theIAnchoris bound to, or any of their ancestors changes in a way that will effect the positions (within the local coordinate space of the attachedNodes).- Returns:
- A read-only observable map storing positions for all attached
AnchorKeys.
-
isAttached
- Parameters:
key- TheAnchorKeyto test.- Returns:
trueif the given key is attached, otherwisefalse.
-
positionsUnmodifiableProperty
Provides a read-only (map) property with positions (in local coordinates of the anchoredNodes) for all attachedAnchorKeys. The positions will be updated for all attachedAnchorKeys if the attachedNodes or the anchorageNode, theIAnchoris bound to, or any of their ancestors changes in a way that will effect the positions (within the local coordinate space of the attachedNodes).- See Also:
-