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 AnchorKeys (i.e. anchored
Nodes). |
| 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, updatePositionpublic 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 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 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 AnchorKeys.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 AnchorKeys (i.e. anchored
Nodes).referencePositionInScene - The position in scene coordinates to be provided for all
attached AnchorKeys.protected Point computePosition(AnchorKey key)
AbstractFXAnchorAnchorKey.computePosition in class AbstractFXAnchorkey - The AnchorKey for which the position is computed.AnchorKey.public java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2014 itemis AG and others. All rights reserved.