1. /*
  2. * @(#)HierarchyBoundsAdapter.java 1.7 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.awt.event;
  8. /**
  9. * An abstract adapter class for receiving ancestor moved and resized events.
  10. * The methods in this class are empty. This class exists as a
  11. * convenience for creating listener objects.
  12. * <p>
  13. * Extend this class and override the method for the event of interest. (If
  14. * you implement the <code>HierarchyBoundsListener</code> interface, you have
  15. * to define both methods in it. This abstract class defines null methods for
  16. * them both, so you only have to define the method for the event you care
  17. * about.)
  18. * <p>
  19. * Create a listener object using your class and then register it with a
  20. * Component using the Component's <code>addHierarchyBoundsListener</code>
  21. * method. When the hierarchy to which the Component belongs changes by
  22. * resize or movement of an ancestor, the relevant method in the listener
  23. * object is invoked, and the <code>HierarchyEvent</code> is passed to it.
  24. *
  25. * @author David Mendenhall
  26. * @version 1.7, 12/19/03
  27. * @see HierarchyBoundsListener
  28. * @see HierarchyEvent
  29. * @since 1.3
  30. */
  31. public abstract class HierarchyBoundsAdapter implements HierarchyBoundsListener
  32. {
  33. /**
  34. * Called when an ancestor of the source is moved.
  35. */
  36. public void ancestorMoved(HierarchyEvent e) {}
  37. /**
  38. * Called when an ancestor of the source is resized.
  39. */
  40. public void ancestorResized(HierarchyEvent e) {}
  41. }