1. /*
  2. * @(#)HierarchyBoundsListener.java 1.6 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.awt.event;
  8. import java.util.EventListener;
  9. /**
  10. * The listener interface for receiving ancestor moved and resized events.
  11. * The class that is interested in processing these events either implements
  12. * this interface (and all the methods it contains) or extends the abstract
  13. * <code>HierarchyBoundsAdapter</code> class (overriding only the method of
  14. * interest).
  15. * The listener object created from that class is then registered with a
  16. * Component using the Component's <code>addHierarchyBoundsListener</code>
  17. * method. When the hierarchy to which the Component belongs changes by
  18. * the resizing or movement of an ancestor, the relevant method in the listener
  19. * object is invoked, and the <code>HierarchyEvent</code> is passed to it.
  20. * <p>
  21. * Hierarchy events are provided for notification purposes ONLY;
  22. * The AWT will automatically handle changes to the hierarchy internally so
  23. * that GUI layout works properly regardless of whether a
  24. * program registers an <code>HierarchyBoundsListener</code> or not.
  25. *
  26. * @author David Mendenhall
  27. * @version 1.6, 01/23/03
  28. * @see HierarchyBoundsAdapter
  29. * @see HierarchyEvent
  30. * @since 1.3
  31. */
  32. public interface HierarchyBoundsListener extends EventListener {
  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. }