net.sourceforge.webcompmath.draw
Interface Draggable

All Known Implementing Classes:
DraggablePoint, WCMDraggablePointBean

public interface Draggable

An interface that can be implemented by an object that can be dragged with the mouse.


Method Summary
 void continueDrag(java.awt.event.MouseEvent evt)
          Continue a drag that was started in startDrag().
 void finishDrag(java.awt.event.MouseEvent evt)
          Finish a draw that was started in startDrag().
 boolean startDrag(java.awt.event.MouseEvent evt)
          Tell the object that a drag operation might be beginning.
 

Method Detail

startDrag

boolean startDrag(java.awt.event.MouseEvent evt)
Tell the object that a drag operation might be beginning. The Draggable object can decide whether it really wants to be dragged, based on the MouseEvent. It should return true to indicate that a drag should really be started, and false if it wants to ignore the MouseEvent.

Parameters:
evt - the event created when user drags the mouse
Returns:
true or false

continueDrag

void continueDrag(java.awt.event.MouseEvent evt)
Continue a drag that was started in startDrag(). Presumably the event is a mouseDragged event.

Parameters:
evt - the event created when user drags the mouse

finishDrag

void finishDrag(java.awt.event.MouseEvent evt)
Finish a draw that was started in startDrag(). Presumably the event is a mouseReleased event.

Parameters:
evt - the event created when user stops dragging the mouse