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 Type
    Method
    Description
    void
    Continue a drag that was started in startDrag().
    void
    Finish a draw that was started in startDrag().
    boolean
    Tell the object that a drag operation might be beginning.
  • Method Details

    • startDrag

      boolean startDrag(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.
    • continueDrag

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

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