Class AbstractSegmentHandlePart<N extends javafx.scene.Node>

    • Constructor Detail

      • AbstractSegmentHandlePart

        public AbstractSegmentHandlePart()
    • Method Detail

      • compareTo

        public int compareTo​(AbstractSegmentHandlePart<? extends javafx.scene.Node> o)
        Specified by:
        compareTo in interface java.lang.Comparable<N extends javafx.scene.Node>
      • doRefreshVisual

        public void doRefreshVisual​(N visual)
        Description copied from class: AbstractVisualPart
        Refreshes this part's visualization based on this part's content.
        Specified by:
        doRefreshVisual in class AbstractVisualPart<N extends javafx.scene.Node>
        Parameters:
        visual - This part's visual.
      • getBezierSegmentInParent

        protected BezierCurve getBezierSegmentInParent()
        Returns the BezierCurve at which this handle part is anchored (depending on segment index), or null if that BezierCurve cannot be determined.
        Returns:
        The BezierCurve at which this handle part is anchored, or null if that BezierCurve cannot be determined.
      • getConnectedFill

        protected javafx.scene.paint.Color getConnectedFill()
        Returns the Color that is used to fill connected handles.
        Returns:
        The Color that is used to fill connected handles.
      • getInsertFill

        protected javafx.scene.paint.Color getInsertFill()
        Returns the Color that is used to fill insertion handles.
        Returns:
        The Color that is used to fill insertion handles.
      • getMoveFill

        protected javafx.scene.paint.Color getMoveFill()
        Returns the Color that is used to fill movement handles.
        Returns:
        The Color that is used to fill movement handles.
      • getPosition

        protected Point getPosition​(BezierCurve segment)
        Returns the position of this AbstractSegmentHandlePart on the given segment using the segment parameter that is assigned to this part.
        Parameters:
        segment - The BezierCurve on which the position is evaluated.
        Returns:
        The position of this part on the given segment using the segment parameter of this part.
      • getSegmentCount

        public int getSegmentCount()
        Returns the number of segments that are provided to this part.
        Returns:
        The number of segments that are provided to this part.
      • getSegmentIndex

        public int getSegmentIndex()
        The segmentIndex specifies the segment of the IGeometry provided by the handle geometry provider on which this selection handle part is positioned. For a shape geometry, segments are determined by the IShape.getOutlineSegments() method. For a curve geometry, segments are determined by the ICurve.toBezier() method. The exact position on the segment is specified by the segmentParameter.
        Returns:
        segmentIndex
      • getSegmentParameter

        public double getSegmentParameter()
        The segmentParameter is a value between 0 and 1. It determines the final point on the segment which this selection handle part belongs to.
        Returns:
        segmentParameter
      • getSegmentsInScene

        protected BezierCurve[] getSegmentsInScene()
        Returns the BezierCurves that are provided to this part in the coordinate system of the Scene.
        Returns:
        The BezierCurves that are provided to this part in the coordinate system of the Scene.
      • getStroke

        protected javafx.scene.paint.Color getStroke()
        Returns the Color that is used to stroke handles.
        Returns:
        The Color that is used to stroke handles.
      • setSegmentIndex

        public void setSegmentIndex​(int segmentIndex)
        Sets the segment index and refreshes the visual.
        Parameters:
        segmentIndex - The segment index to set.
        See Also:
        getSegmentIndex()
      • setSegmentParameter

        public void setSegmentParameter​(double segmentParameter)
        Sets the segment parameter and refreshes the visual.
        Parameters:
        segmentParameter - The segment parameter to set.
        See Also:
        getSegmentParameter()
      • setSegmentsProvider

        public void setSegmentsProvider​(Provider<BezierCurve[]> segmentsProvider)
        Sets the Provider<BezierCurve[]> for this part to the given value.
        Parameters:
        segmentsProvider - The new Provider<BezierCurve[]> for this part.
      • updateLocation

        protected void updateLocation​(N visual)
        Computes the location for this part and relocates its visual to that location. The visual is made invisible if this part has an invalid index (out of bounds), i.e. when no location can be computed.
        Parameters:
        visual - This part's visual for convenience.