Class EditElementMouseTransformFactory._MoveControlPointTransform

    • Constructor Detail

      • _MoveControlPointTransform

        public _MoveControlPointTransform​(Element target,
                                          int pointIndex,
                                          EditPointConstraint constraint,
                                          java.lang.String helpMessage,
                                          Grid grid)
        Parameters:
        target - the element upon which is transform will act
        pointIndex - index of the Element's point that will be moved
        grid - the Grid instance used for alignment (if it's snap-on)
        constraint - the geometrical constraint to be used when moving control-points ; may be null
        helpMessage - if non-null, this will be displayed on mouse-move events instead of the default help-message for this mouse-transform.
        See Also:
        jpicedt.graphic.model.Element.setPoint
    • Method Detail

      • process

        public void process​(PEMouseEvent e)
        Called when the mouse is dragged. If !isCompleted, sets the clone's point (with the index given as parameter in the constructor) to the current mouse position, or its nearet-neighbour on the grid if grid-snap is on.
      • next

        public boolean next​(PEMouseEvent e)
        Called when the mouse is released. Updates the original element, then call superclass.
        Specified by:
        next in interface MouseTransform
        Overrides:
        next in class AbstractMouseTransform
        Returns:
        true if there's another task in the sequence, false if mouse-transform has completed with this mouse-event.
      • getHelpMessage

        public java.lang.String getHelpMessage()
        Description copied from interface: MouseTransform
        Return a help-message for the UI, that makes sense with this transform.
        Returns:
        a help-message for the UI, that makes sense with this transform.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a textual representation of this transform for debugging purpose
      • getCursor

        public java.awt.Cursor getCursor()
        Description copied from interface: MouseTransform
        Return the cursor for this MouseTransform
        Returns:
        a cursor adequate with this mouse-transform, delegating to CursorFactory. If the target-element of PicGroup, returns a cursor according to pointIndex.