Package edu.hws.jcm.draw
Interface Draggable
- All Known Implementing Classes:
DraggablePoint
public interface Draggable
An interface that can be implemented by an object that can be dragged
with the mouse.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
continueDrag
(MouseEvent evt) Continue a drag that was started in startDrag().void
finishDrag
(MouseEvent evt) Finish a draw that was started in startDrag().boolean
startDrag
(MouseEvent evt) Tell the object that a drag operation might be beginning.
-
Method Details
-
startDrag
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. -
continueDrag
Continue a drag that was started in startDrag(). Presumably the event is a mouseDragged event. -
finishDrag
Finish a draw that was started in startDrag(). Presumably the event is a mouseReleased event.
-