http://www.jpicedt.org

jpicedt.graphic.toolkit
Interface MouseTransform

All Known Implementing Classes:
AbstractMouseTransform, AbstractMouseTransformFactory.HelpMessageMouseTransform, AbstractMouseTransformFactory.InvalidMouseTransform, AbstractMouseTransformFactory.SelectAreaTransform, EditConvexZoneMouseTransformFactory.MoveConvexZoneTransform, EditConvexZoneMouseTransformFactory.SelectConvexZonesInAreaTransform, EditConvexZoneMouseTransformFactory.UnselectTransform, EditElementMouseTransformFactory._MoveControlPointTransform, EditElementMouseTransformFactory._MoveElementTransform, EditElementMouseTransformFactory.MoveControlPointTransform, EditElementMouseTransformFactory.MoveElementTransform, EditElementMouseTransformFactory.SelectElementsDialogTransform, EditElementMouseTransformFactory.SelectElementsInAreaTransform, EditElementMouseTransformFactory.UnselectTransform, EditPointMouseTransformFactory.EditSmoothCoeffTransform, EditPointMouseTransformFactory.RemovePointTransform, EditPointMouseTransformFactory.SelectElementTransform, EditPointMouseTransformFactory.SelectPointsInAreaTransform, EditPointMouseTransformFactory.SplitSegmentTransform, EditPointMouseTransformFactory.UnSelectPointTransform

public interface MouseTransform

An interface that specifies behaviours shared by mouse-driven object-editing actions, especially when driven by SelectionTool. Sequence order is:

  1. mouse-press : start()
  2. mouse-dragged : process()
  3. mouse-released : next() ? no ⇒ end()
  4. mouse-moved : process()
  5. mouse-pressed : next() ? no ⇒ end()
  6. etc…

Since:
jpicedt 1.3.2

Method Summary
 Cursor getCursor()
          Return the cursor for this MouseTransform
 String getHelpMessage()
          Return a help-message for the UI, that makes sense with this transform.
 boolean next(PEMouseEvent e)
          Called when the left mouse-button changes state.
 void paint(Graphics2D g, Rectangle2D allocation, double scale)
          Allows the MouseTransform to do specific graphic rendering when it's operating.
 void process(PEMouseEvent e)
          Called when the mouse is dragged/moved after the first mouse-pressed event.
 void start(PEMouseEvent e)
          Called when the mouse is pressed.
 

Method Detail

start

void start(PEMouseEvent e)
Called when the mouse is pressed. The transform should do the initialization work here.

Since:
jpicedt 1.3.2

process

void process(PEMouseEvent e)
Called when the mouse is dragged/moved after the first mouse-pressed event. Element geometry update should occur here.

Since:
jpicedt 1.3.2

next

boolean next(PEMouseEvent e)
Called when the left mouse-button changes state.

Returns:
true if there's another task in the sequence, false if mouse-transform has completed with this mouse-event.

getCursor

Cursor getCursor()
Return the cursor for this MouseTransform

Since:
jpicedt 1.3.2

paint

void paint(Graphics2D g,
           Rectangle2D allocation,
           double scale)
Allows the MouseTransform to do specific graphic rendering when it's operating.

Since:
jpicedt 1.3.2

getHelpMessage

String getHelpMessage()
Return a help-message for the UI, that makes sense with this transform.


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org