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, position
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 AnchorKey s (i.e. anchored
Node s). |
Modifier and Type | Method and Description |
---|---|
protected Point |
computePosition(AnchorKey key)
Computes and returns the position for the given
AnchorKey . |
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, getPosition, isAttached, positionProperty, registerVCL, registerVCLs, setAnchorage, unregisterVCL, unregisterVCLs, updatePosition
public 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.positionProperty()
) for all attached AnchorKey
s (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.positionProperty()
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 AnchorKey
s.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 AnchorKey
s (i.e. anchored
Node
s).referencePositionInScene
- The position in scene coordinates to be provided for all
attached AnchorKey
s.protected Point computePosition(AnchorKey key)
AbstractAnchor
AnchorKey
.computePosition
in class AbstractAnchor
key
- The AnchorKey
for which the position is computed.AnchorKey
.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.Object
Copyright (c) 2014 itemis AG and others. All rights reserved.