public class ChopBoxStrategy extends ProjectionStrategy
IComputationStrategy.Parameter<T>
Constructor and Description |
---|
ChopBoxStrategy() |
Modifier and Type | Method and Description |
---|---|
protected 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,
java.util.Set<IComputationStrategy.Parameter<?>> parameters)
Computes an anchor position based on the given anchorage visual, anchored
visual, and anchored reference point.
|
computeProjectionInScene, getOutlineSegments, getRequiredParameters
protected Point computeAnchorageReferencePointInLocal(javafx.scene.Node anchorage, IGeometry geometryInLocal, Point anchoredReferencePointInAnchorageLocal)
IGeometry
. Will return the center of a IShape
or Path
geometry, if it is contained within the shape or path.
Will return null
otherwise to indicate that the computation
should fall back to the nearest projection on the anchorage geometry
outline.anchorage
- The anchorage visual.geometryInLocal
- The anchorage geometry within the local coordinate system of
the anchorage visual.anchoredReferencePointInAnchorageLocal
- Reference point of the anchored for which to determine the
anchorage reference point. Within the local coordinate system
of the anchorage.IGeometry
, or
null
if the computation should rather fall back to
the nearest projection.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.null
if the computation should rather fall back to
the nearest projection.computeAnchorageReferencePointInLocal(Node, IGeometry, Point)
public Point computePositionInScene(javafx.scene.Node anchorage, javafx.scene.Node anchored, java.util.Set<IComputationStrategy.Parameter<?>> parameters)
IComputationStrategy
computePositionInScene
in interface IComputationStrategy
computePositionInScene
in class ProjectionStrategy
anchorage
- The anchorage visual.anchored
- The anchored visual.parameters
- The available computation parameters. strategy.Copyright (c) 2014 itemis AG and others. All rights reserved.