public static class FXChopBoxAnchor.ComputationStrategy.Impl extends java.lang.Object implements FXChopBoxAnchor.ComputationStrategy
FXChopBoxAnchor.ComputationStrategy
computes an anchor position as follows:
getAnchorageReferenceGeometryInLocal(Node)
).computeAnchorageReferencePointInLocal(Node, IGeometry)
).
computeAnchorageReferencePointInScene(Node, IGeometry)
).
getOutline(IGeometry)
).FXChopBoxAnchor.ComputationStrategy.Impl
Constructor and Description |
---|
Impl() |
Modifier and Type | Method and Description |
---|---|
Point |
computeAnchorageReferencePointInLocal(javafx.scene.Node node,
IGeometry geometryInLocal)
Computes the anchorage reference position within the coordinate
system of the given
IGeometry . |
protected Point |
computeAnchorageReferencePointInScene(javafx.scene.Node node,
IGeometry geometryInLocal)
Computes the anchorage reference position in scene coordinates,
based on the given anchorage geometry.
|
Point |
computePositionInScene(javafx.scene.Node anchorage,
javafx.scene.Node anchored,
Point anchoredReferencePointInLocal)
Computes an anchor position based on the given anchorage visual,
anchored visual, and anchored reference point.
|
protected IGeometry |
getAnchorageReferenceGeometryInLocal(javafx.scene.Node anchorage)
Determines the anchorage geometry based on the given anchorage
visual.
|
protected Point |
getNearestVertex(Point boundsCenter,
IShape shape)
|
protected ICurve |
getOutline(IGeometry geometry)
Determines the outline of the given
IGeometry . |
public Point computeAnchorageReferencePointInLocal(javafx.scene.Node node, IGeometry geometryInLocal)
IGeometry
. For an IShape
geometry, the center is used if it is contained within the shape,
otherwise, the vertex nearest to the center is used as the
reference position. For an ICurve
geometry, the first
point is used as the reference position.node
- The anchorage visual.geometryInLocal
- The anchorage geometry within the local coordinate
system of the anchorage visual.IGeometry
.protected Point computeAnchorageReferencePointInScene(javafx.scene.Node node, IGeometry geometryInLocal)
node
- The anchorage visual.geometryInLocal
- The anchorage geometry within the coordinate system of
the anchorage visual.computeAnchorageReferencePointInLocal(Node, IGeometry)
public Point computePositionInScene(javafx.scene.Node anchorage, javafx.scene.Node anchored, Point anchoredReferencePointInLocal)
FXChopBoxAnchor.ComputationStrategy
computePositionInScene
in interface FXChopBoxAnchor.ComputationStrategy
anchorage
- The anchorage visual.anchored
- The anchored visual.anchoredReferencePointInLocal
- The anchored reference point within the local coordinate
system of the anchored visual.protected IGeometry getAnchorageReferenceGeometryInLocal(javafx.scene.Node anchorage)
FXGeometryNode
, the corresponding geometry
is returned. Otherwise, a Rectangle
representing the
layout-bounds of the visual is returned.anchorage
- The anchorage visual.protected Point getNearestVertex(Point boundsCenter, IShape shape)
boundsCenter
- The ideal anchorage reference position.shape
- The anchorage geometry.Copyright (c) 2014 itemis AG and others. All rights reserved.