public static class ChopBoxAnchor.IComputationStrategy.Impl extends java.lang.Object implements ChopBoxAnchor.IComputationStrategy
ChopBoxAnchor.IComputationStrategy
computes an anchor position as follows:
getAnchorageReferenceGeometryInLocal(Node)).computeAnchorageReferencePointInLocal(Node, IGeometry, Point)
).computeAnchorageReferencePointInScene(Node, IGeometry, Point)
).getOutlines(IGeometry)).ChopBoxAnchor.IComputationStrategy.Impl| Constructor and Description |
|---|
Impl() |
| Modifier and Type | Method and Description |
|---|---|
Point |
computeAnchorageReferencePointInLocal(javafx.scene.Node anchorage,
IGeometry geometryInLocal,
Point anchoredReferencePointInAnchorageLocal)
Computes the anchorage reference position within the coordinate
system of the given
IGeometry. |
protected Point |
computeAnchorageReferencePointInScene(javafx.scene.Node anchorage,
IGeometry geometryInLocal,
Point anchoredReferencePointInScene)
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,
ICurve curve)
|
protected Point |
getNearestVertex(Point boundsCenter,
IShape shape)
|
protected Point |
getNearestVertex(Point boundsCenter,
Path path)
|
java.util.List<ICurve> |
getOutlines(IGeometry geometry)
|
public Point computeAnchorageReferencePointInLocal(javafx.scene.Node anchorage, IGeometry geometryInLocal, Point anchoredReferencePointInAnchorageLocal)
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.anchorage - The anchorage visual.geometryInLocal - The anchorage geometry within the local coordinate
system of the anchorage visual.anchoredReferencePointInAnchorageLocal - Refernce point of the anchored for which to determine
the anchorage reference point. Within the local
coordinate system of the anchorage.IGeometry.protected Point computeAnchorageReferencePointInScene(javafx.scene.Node anchorage, IGeometry geometryInLocal, Point anchoredReferencePointInScene)
anchorage - The anchorage visual.geometryInLocal - The anchorage geometry within the coordinate system of
the anchorage visual.anchoredReferencePointInScene - The reference Point of the anchored for which
the anchorage reference Point is to be
determined.computeAnchorageReferencePointInLocal(Node, IGeometry,
Point)public Point computePositionInScene(javafx.scene.Node anchorage, javafx.scene.Node anchored, Point anchoredReferencePointInLocal)
ChopBoxAnchor.IComputationStrategycomputePositionInScene in interface ChopBoxAnchor.IComputationStrategyanchorage - 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)
GeometryNode, 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, ICurve curve)
ICurve which is
nearest to the given center Point. The vertices for the
ICurve are computed via its bezier curve approximation.
For all BezierCurves that are part of the approximation,
the start point, middle point, and end point is considered as a
vertex.boundsCenter - The ideal anchorage reference position.curve - The anchorage geometry.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.