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