public class StaticAnchor extends AbstractAnchor
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.| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<Point> |
referencePosition
Returns the
ObjectProperty that manages the reference position of
this StaticAnchor. |
anchorage, positionsUnmodifiable| Constructor and Description |
|---|
StaticAnchor(javafx.scene.Node anchorage,
Point referencePositionInAnchorageLocal)
Creates an
StaticAnchor that is bound to the provided anchorage. |
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). |
| Modifier and Type | Method and Description |
|---|---|
protected Point |
computePosition(AnchorKey key)
Recomputes the position for the given attached
AnchorKey by
delegating to the respective IComputationStrategy. |
Point |
getReferencePosition()
Returns the reference position of this
StaticAnchor. |
javafx.beans.property.ObjectProperty<Point> |
referencePositionProperty()
Returns the
ObjectProperty that manages the reference position of
this StaticAnchor. |
void |
setReferencePosition(Point referencePosition)
Sets the reference position of this
StaticAnchor to the given
value. |
java.lang.String |
toString() |
anchorageProperty, attach, detach, getAnchorage, getKeys, getKeysByNode, getPosition, getPositionsUnmodifiable, isAttached, positionsUnmodifiableProperty, registerVCL, registerVCLs, setAnchorage, unregisterVCL, unregisterVCLs, updatePosition, updatePositionspublic javafx.beans.property.ObjectProperty<Point> referencePositionProperty
ObjectProperty that manages the reference position of
this StaticAnchor.public StaticAnchor(javafx.scene.Node anchorage,
Point referencePositionInAnchorageLocal)
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.
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.public StaticAnchor(Point referencePositionInScene)
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).referencePositionInScene - The position in scene coordinates to be provided for all
attached AnchorKeys.protected Point computePosition(AnchorKey key)
AbstractAnchorAnchorKey by
delegating to the respective IComputationStrategy.computePosition in class AbstractAnchorkey - The AnchorKey for which to compute an anchor position.AnchorKey in local coordinates of
the anchored Node.public Point getReferencePosition()
StaticAnchor.StaticAnchor.public javafx.beans.property.ObjectProperty<Point> referencePositionProperty()
ObjectProperty that manages the reference position of
this StaticAnchor.public void setReferencePosition(Point referencePosition)
StaticAnchor to the given
value.referencePosition - The new reference position for this StaticAnchor.public java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2014 itemis AG and others. All rights reserved.