1. /*
  2. * @(#)HierarchyListener.java 1.5 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 hierarchy changed events.
  14. * The class that is interested in processing a hierarchy changed event
  15. * should implement this interface.
  16. * The listener object created from that class is then registered with a
  17. * Component using the Component's <code>addHierarchyListener</code>
  18. * method. When the hierarchy to which the Component belongs changes, the
  19. * <code>hierarchyChanged</code> method in the listener object is invoked,
  20. * and the <code>HierarchyEvent</code> is passed to it.
  21. * <p>
  22. * Hierarchy events are provided for notification purposes ONLY;
  23. * The AWT will automatically handle changes to the hierarchy internally so
  24. * that GUI layout, displayability, and visibility work properly regardless
  25. * of whether a program registers a <code>HierarchyListener</code> or not.
  26. *
  27. * @author David Mendenhall
  28. * @version 1.5, 02/02/00
  29. * @see HierarchyEvent
  30. * @since 1.3
  31. */
  32. public interface HierarchyListener extends EventListener {
  33. /**
  34. * Called when the hierarchy has been changed. To discern the actual
  35. * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
  36. *
  37. * @see HierarchyEvent#getChangeFlags()
  38. */
  39. public void hierarchyChanged(HierarchyEvent e);
  40. }