Package jpicedt.graphic.toolkit
Class EditElementMouseTransformFactory._MoveControlPointTransform
- java.lang.Object
-
- jpicedt.graphic.toolkit.AbstractMouseTransform
-
- jpicedt.graphic.toolkit.EditElementMouseTransformFactory._MoveControlPointTransform
-
- All Implemented Interfaces:
MouseTransform
- Enclosing class:
- EditElementMouseTransformFactory
protected class EditElementMouseTransformFactory._MoveControlPointTransform extends AbstractMouseTransform
a mouse-transform that moves element's end-points, ie aka scales elements
-
-
Constructor Summary
Constructors Constructor Description _MoveControlPointTransform(Element target, int pointIndex, EditPointConstraint constraint, java.lang.String helpMessage, Grid grid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.CursorgetCursor()Return the cursor for this MouseTransformjava.lang.StringgetHelpMessage()Return a help-message for the UI, that makes sense with this transform.booleannext(PEMouseEvent e)Called when the mouse is released.voidprocess(PEMouseEvent e)Called when the mouse is dragged.java.lang.StringtoString()-
Methods inherited from class jpicedt.graphic.toolkit.AbstractMouseTransform
getClone, getTarget, paint, start
-
-
-
-
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 actpointIndex- index of the Element's point that will be movedgrid- the Grid instance used for alignment (if it's snap-on)constraint- the geometrical constraint to be used when moving control-points ; may be nullhelpMessage- 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:
nextin interfaceMouseTransform- Overrides:
nextin classAbstractMouseTransform- 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:MouseTransformReturn 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:
toStringin classjava.lang.Object- Returns:
- a textual representation of this transform for debugging purpose
-
getCursor
public java.awt.Cursor getCursor()
Description copied from interface:MouseTransformReturn 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 topointIndex.
-
-