src/share/classes/java/awt/event/MouseMotionListener.java

Print this page




  43  * occurs, the relevant method in the listener object is invoked, and
  44  * the <code>MouseEvent</code> is passed to it.
  45  *
  46  * @author Amy Fowler
  47  *
  48  * @see MouseMotionAdapter
  49  * @see MouseEvent
  50  * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  51  *
  52  * @since 1.1
  53  */
  54 public interface MouseMotionListener extends EventListener {
  55 
  56     /**
  57      * Invoked when a mouse button is pressed on a component and then
  58      * dragged.  <code>MOUSE_DRAGGED</code> events will continue to be
  59      * delivered to the component where the drag originated until the
  60      * mouse button is released (regardless of whether the mouse position
  61      * is within the bounds of the component).
  62      * <p>
  63      * Due to platform-dependent Drag&Drop implementations,
  64      * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
  65      * Drag&Drop operation.
  66      */
  67     public void mouseDragged(MouseEvent e);
  68 
  69     /**
  70      * Invoked when the mouse cursor has been moved onto a component
  71      * but no buttons have been pushed.
  72      */
  73     public void mouseMoved(MouseEvent e);
  74 
  75 }


  43  * occurs, the relevant method in the listener object is invoked, and
  44  * the <code>MouseEvent</code> is passed to it.
  45  *
  46  * @author Amy Fowler
  47  *
  48  * @see MouseMotionAdapter
  49  * @see MouseEvent
  50  * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  51  *
  52  * @since 1.1
  53  */
  54 public interface MouseMotionListener extends EventListener {
  55 
  56     /**
  57      * Invoked when a mouse button is pressed on a component and then
  58      * dragged.  <code>MOUSE_DRAGGED</code> events will continue to be
  59      * delivered to the component where the drag originated until the
  60      * mouse button is released (regardless of whether the mouse position
  61      * is within the bounds of the component).
  62      * <p>
  63      * Due to platform-dependent Drag&amp;Drop implementations,
  64      * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
  65      * Drag&amp;Drop operation.
  66      */
  67     public void mouseDragged(MouseEvent e);
  68 
  69     /**
  70      * Invoked when the mouse cursor has been moved onto a component
  71      * but no buttons have been pushed.
  72      */
  73     public void mouseMoved(MouseEvent e);
  74 
  75 }