1. /*
  2. * @(#)MouseMotionListener.java 1.9 00/02/02
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.awt.event;
  11. import java.util.EventListener;
  12. /**
  13. * The listener interface for receiving mouse motion events on a component.
  14. * (For clicks and other mouse events, use the MouseListener.)
  15. * <P>
  16. * The class that is interested in processing a mouse motion event
  17. * either implements this interface (and all the methods it
  18. * contains) or extends the abstract <code>MouseMotionAdapter</code> class
  19. * (overriding only the methods of interest).
  20. * <P>
  21. * The listener object created from that class is then registered with a
  22. * component using the component's <code>addMouseMotionListener</code>
  23. * method. A mouse motion event is generated when the mouse is moved
  24. * or dragged. (Many such events will be generated). When a mouse motion event
  25. * occurs, the relevant method in the listener object is invoked, and
  26. * the <code>MouseEvent</code> is passed to it.
  27. *
  28. * @author Amy Fowler
  29. * @version 1.9 02/02/00
  30. *
  31. * @see MouseMotionAdapter
  32. * @see MouseEvent
  33. * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  34. * @see <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a>
  35. *
  36. * @since 1.1
  37. */
  38. public interface MouseMotionListener extends EventListener {
  39. /**
  40. * Invoked when a mouse button is pressed on a component and then
  41. * dragged. Mouse drag events will continue to be delivered to
  42. * the component where the first originated until the mouse button is
  43. * released (regardless of whether the mouse position is within the
  44. * bounds of the component).
  45. */
  46. public void mouseDragged(MouseEvent e);
  47. /**
  48. * Invoked when the mouse button has been moved on a component
  49. * (with no buttons no down).
  50. */
  51. public void mouseMoved(MouseEvent e);
  52. }