1. /*
  2. * @(#)HierarchyBoundsAdapter.java 1.4 00/02/02
  3. *
  4. * Copyright 1997-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 ancestor moved and resized events.
  13. * The methods in this class are empty. This class exists as a
  14. * convenience for creating listener objects.
  15. * <p>
  16. * Extend this class and override the method for the event of interest. (If
  17. * you implement the <code>HierarchyBoundsListener</code> interface, you have
  18. * to define both methods in it. This abstract class defines null methods for
  19. * them both, so you only have to define the method for the event you care
  20. * about.)
  21. * <p>
  22. * Create a listener object using your class and then register it with a
  23. * Component using the Component's <code>addHierarchyBoundsListener</code>
  24. * method. When the hierarchy to which the Component belongs changes by
  25. * resize or movement of an ancestor, the relevant method in the listener
  26. * object is invoked, and the <code>HierarchyEvent</code> is passed to it.
  27. *
  28. * @author David Mendenhall
  29. * @version 1.4, 02/02/00
  30. * @see HierarchyBoundsListener
  31. * @see HierarchyEvent
  32. * @since 1.3
  33. */
  34. public abstract class HierarchyBoundsAdapter implements HierarchyBoundsListener
  35. {
  36. /**
  37. * Called when an ancestor of the source is moved.
  38. */
  39. public void ancestorMoved(HierarchyEvent e) {}
  40. /**
  41. * Called when an ancestor of the source is resized.
  42. */
  43. public void ancestorResized(HierarchyEvent e) {}
  44. }