KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > awt > event > HierarchyListener


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
8 package java.awt.event;
9
10 import java.util.EventListener JavaDoc;
11
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.8, 12/19/03
29  * @see HierarchyEvent
30  * @since 1.3
31  */

32 public interface HierarchyListener extends EventListener JavaDoc {
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 JavaDoc e);
40 }
41
Popular Tags