Package jpicedt.graphic.toolkit
Class EditElementMouseTransformFactory.MoveElementTransform
- java.lang.Object
-
- jpicedt.graphic.toolkit.EditElementMouseTransformFactory.MoveElementTransform
-
- All Implemented Interfaces:
MouseTransform
- Enclosing class:
- EditElementMouseTransformFactory
protected class EditElementMouseTransformFactory.MoveElementTransform extends java.lang.Object implements MouseTransform
A mouse-transform that can translate an element, or a group of element.
-
-
Constructor Summary
Constructors Constructor Description MoveElementTransform(BranchElement target, int anchorChildIndex, PicPoint clickPt, Grid grid)MoveElementTransform(Element target, PicPoint clickPt, 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 left mouse-button changes state.voidpaint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)Allows the MouseTransform to do specific graphic rendering when it's operating.voidprocess(PEMouseEvent me)Called when the mouse is dragged.voidstart(PEMouseEvent e)Called when the mouse is pressed.java.lang.StringtoString()
-
-
-
Constructor Detail
-
MoveElementTransform
public MoveElementTransform(BranchElement target, int anchorChildIndex, PicPoint clickPt, Grid grid)
- Parameters:
target- the selection-handler upon which this transform acts (globally)anchorChildIndex- index of target's child that will serve as the reference-child for grid alignment ; if null, target is used instead ;clickPt-
-
-
Method Detail
-
start
public void start(PEMouseEvent e)
Called when the mouse is pressed.- Specified by:
startin interfaceMouseTransform
-
getCursor
public java.awt.Cursor getCursor()
Description copied from interface:MouseTransformReturn the cursor for this MouseTransform- Specified by:
getCursorin interfaceMouseTransform- Returns:
- a Cursor whose type is adequate with this mouse-transform.
-
process
public void process(PEMouseEvent me)
Called when the mouse is dragged.- Specified by:
processin interfaceMouseTransform
-
next
public boolean next(PEMouseEvent e)
Description copied from interface:MouseTransformCalled when the left mouse-button changes state.- Specified by:
nextin interfaceMouseTransform- Returns:
- true if there's another task in the sequence, false if mouse-transform has completed with this mouse-event.
-
paint
public void paint(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)Description copied from interface:MouseTransformAllows the MouseTransform to do specific graphic rendering when it's operating.- Specified by:
paintin interfaceMouseTransform
-
getHelpMessage
public java.lang.String getHelpMessage()
Description copied from interface:MouseTransformReturn a help-message for the UI, that makes sense with this transform.- Specified by:
getHelpMessagein interfaceMouseTransform- Returns:
- a help-message for the UI, that makes sense with this transform.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-