1. /*
  2. * @(#)HierarchyBoundsListener.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. import java.util.EventListener;
  12. /**
  13. * The listener interface for receiving ancestor moved and resized events.
  14. * The class that is interested in processing these events either implements
  15. * this interface (and all the methods it contains) or extends the abstract
  16. * <code>HierarchyBoundsAdapter</code> class (overriding only the method of
  17. * interest).
  18. * The listener object created from that class is then registered with a
  19. * Component using the Component's <code>addHierarchyBoundsListener</code>
  20. * method. When the hierarchy to which the Component belongs changes by
  21. * the resizing or movement of an ancestor, the relevant method in the listener
  22. * object is invoked, and the <code>HierarchyEvent</code> is passed to it.
  23. * <p>
  24. * Hierarchy events are provided for notification purposes ONLY;
  25. * The AWT will automatically handle changes to the hierarchy internally so
  26. * that GUI layout works properly regardless of whether a
  27. * program registers an <code>HierarchyBoundsListener</code> or not.
  28. *
  29. * @author David Mendenhall
  30. * @version 1.4, 02/02/00
  31. * @see HierarchyBoundsAdapter
  32. * @see HierarchyEvent
  33. * @since 1.3
  34. */
  35. public interface HierarchyBoundsListener extends EventListener {
  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. }