1. /*
  2. * @(#)MouseMotionAdapter.java 1.11 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. /**
  12. * An abstract adapter class for receiving mouse motion events.
  13. * The methods in this class are empty. This class exists as
  14. * convenience for creating listener objects.
  15. * <P>
  16. * Mouse motion events occur when a mouse is moved or dragged.
  17. * (Many such events will be generated in a normal program.
  18. * To track clicks and other mouse events, use the MouseAdapter.)
  19. * <P>
  20. * Extend this class to create a <code>MouseMotionEvent</code> listener
  21. * and override the methods for the events of interest. (If you implement the
  22. * <code>MouseMotionListener</code> interface, you have to define all of
  23. * the methods in it. This abstract class defines null methods for them
  24. * all, so you can only have to define methods for events you care about.)
  25. * <P>
  26. * Create a listener object using the extended class and then register it with
  27. * a component using the component's <code>addMouseMotionListener</code>
  28. * method. When the mouse is moved or dragged, the relevant method in the
  29. * listener object is invoked and the <code>MouseEvent</code> is passed to it.
  30. *
  31. * @author Amy Fowler
  32. * @version 1.11 02/02/00
  33. *
  34. * @see MouseEvent
  35. * @see MouseMotionListener
  36. * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/mousemotionlistener.html">Tutorial: Writing a Mouse Motion Listener</a>
  37. * @see <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a>
  38. *
  39. * @since 1.1
  40. */
  41. public abstract class MouseMotionAdapter implements MouseMotionListener {
  42. /**
  43. * Invoked when a mouse button is pressed on a component and then
  44. * dragged. Mouse drag events will continue to be delivered to
  45. * the component where the first originated until the mouse button is
  46. * released (regardless of whether the mouse position is within the
  47. * bounds of the component).
  48. */
  49. public void mouseDragged(MouseEvent e) {}
  50. /**
  51. * Invoked when the mouse button has been moved on a component
  52. * (with no buttons no down).
  53. */
  54. public void mouseMoved(MouseEvent e) {}
  55. }