public interface IAnchor
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
positionProperty() 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.
| Type | Property and Description |
|---|---|
javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> |
anchorage
Provides a read-only property with the anchorage
Node this
IAnchor is bound to. |
javafx.beans.property.ReadOnlyMapProperty<AnchorKey,Point> |
position
Provides a read-only (map) property with positions (in local coordinates
of the anchored
Nodes) for all attached AnchorKeys. |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> |
anchorageProperty()
Provides a read-only property with the anchorage
Node this
IAnchor is bound to. |
void |
attach(AnchorKey key,
IAdaptable info)
|
void |
detach(AnchorKey key,
IAdaptable info)
|
javafx.scene.Node |
getAnchorage()
Provides the anchorage
Node this IAnchor is bound to. |
Point |
getPosition(AnchorKey key)
Provides a position for the given
AnchorKey. |
boolean |
isAttached(AnchorKey key)
|
javafx.beans.property.ReadOnlyMapProperty<AnchorKey,Point> |
positionProperty()
Provides a read-only (map) property with positions (in local coordinates
of the anchored
Nodes) for all attached AnchorKeys. |
javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> anchorageProperty
Node this
IAnchor is bound to. The property value may be
null in case this IAnchor is not bound to an
anchorage Node.getAnchorage()javafx.beans.property.ReadOnlyMapProperty<AnchorKey,Point> positionProperty
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).javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.Node> anchorageProperty()
Node this
IAnchor is bound to. The property value may be
null in case this IAnchor is not bound to an
anchorage Node.getAnchorage()void attach(AnchorKey key, IAdaptable info)
key - The AnchorKey to be attached.info - An IAdaptable, which may be adapted by the
IAnchor to obtain additional information. May be
null if the respective IAnchor does not
require additional information.void detach(AnchorKey key, IAdaptable info)
key - The AnchorKey to be detached.info - An IAdaptable, which may be adapted by the
IAnchor to obtain additional information. May be
null if the respective IAnchor does not
require additional information.javafx.scene.Node getAnchorage()
Node this IAnchor is bound to.
Will return the value of the anchorageProperty().anchorageProperty().Point getPosition(AnchorKey key)
AnchorKey. The provided
AnchorKey has to be attached to this IAnchor (see
attach(AnchorKey, IAdaptable)).key - The AnchorKey to retrieve a position for. It has to be
attached (attach(AnchorKey, IAdaptable)) to this
IAnchor before.AnchorKey within local
coordinates of the AnchorKey's anchored Node.boolean isAttached(AnchorKey key)
key - The AnchorKey to test.true if the given key is attached, otherwise
false.javafx.beans.property.ReadOnlyMapProperty<AnchorKey,Point> positionProperty()
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).Copyright (c) 2014 itemis AG and others. All rights reserved.