Class ChopBoxStrategy

  • All Implemented Interfaces:
    IComputationStrategy

    public class ChopBoxStrategy
    extends ProjectionStrategy
    A specific projection strategy that is based on a center-projection of the given reference point.
    • Constructor Detail

      • ChopBoxStrategy

        public ChopBoxStrategy()
    • Method Detail

      • computeAnchorageReferencePointInLocal

        protected Point computeAnchorageReferencePointInLocal​(javafx.scene.Node anchorage,
                                                              IGeometry geometryInLocal,
                                                              Point anchoredReferencePointInAnchorageLocal)
        Computes the anchorage reference position within the coordinate system of the given 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.
        Parameters:
        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.
        Returns:
        A position within the given IGeometry, or null if the computation should rather fall back to the nearest projection.
      • computeAnchorageReferencePointInScene

        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.
        Parameters:
        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.
        Returns:
        The anchorage reference position in scene coordinates or null if the computation should rather fall back to the nearest projection.
        See Also:
        computeAnchorageReferencePointInLocal(Node, IGeometry, Point)