public class FXStaticAnchor extends AbstractFXAnchor
FXStaticAnchor
provides a position for each AnchorKey
,
based on a reference position relative to the anchorage Node
, to
which the FXStaticAnchor
is bound, or based on a (global) static
reference position in case the FXStaticAnchor
is unbound.anchorageProperty, positionProperty
Constructor and Description |
---|
FXStaticAnchor(javafx.scene.Node anchorage,
Point referencePositionInAnchorageLocal)
Creates an
FXStaticAnchor that is bound to the provided
anchorage. |
FXStaticAnchor(Point referencePositionInScene)
Creates an
FXStaticAnchor 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 . |
java.lang.String |
toString() |
anchorageProperty, attach, detach, getAnchorage, getKeys, getPosition, isAttached, positionProperty, registerVCLs, setAnchorage, unregisterVCLs, updatePosition
public FXStaticAnchor(javafx.scene.Node anchorage, Point referencePositionInAnchorageLocal)
FXStaticAnchor
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 AbstractFXAnchor.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 AbstractFXAnchor.positionProperty()
will
be updated.
anchorage
- The anchorage Node
to bind this FXStaticAnchor
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 FXStaticAnchor(Point referencePositionInScene)
FXStaticAnchor
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)
AbstractFXAnchor
AnchorKey
.computePosition
in class AbstractFXAnchor
key
- The AnchorKey
for which the position is computed.AnchorKey
.public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2014 itemis AG and others. All rights reserved.