KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > event > AncestorListener


1 /*
2  * @(#)AncestorListener.java 1.12 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 javax.swing.event;
8
9 import java.awt.event.*;
10 import java.awt.*;
11 import java.util.*;
12
13 import javax.swing.*;
14
15 /**
16  * AncestorListener
17  *
18  * Interface to support notification when changes occur to a JComponent or one
19  * of its ancestors. These include movement and when the component becomes
20  * visible or invisible, either by the setVisible() method or by being added
21  * or removed from the component hierarchy.
22  *
23  * @version 1.12 12/19/03
24  * @author Dave Moore
25  */

26 public interface AncestorListener extends EventListener {
27     /**
28      * Called when the source or one of its ancestors is made visible
29      * either by setVisible(true) being called or by its being
30      * added to the component hierarchy. The method is only called
31      * if the source has actually become visible. For this to be true
32      * all its parents must be visible and it must be in a hierarchy
33      * rooted at a Window
34      */

35     public void ancestorAdded(AncestorEvent JavaDoc event);
36
37     /**
38      * Called when the source or one of its ancestors is made invisible
39      * either by setVisible(false) being called or by its being
40      * remove from the component hierarchy. The method is only called
41      * if the source has actually become invisible. For this to be true
42      * at least one of its parents must by invisible or it is not in
43      * a hierarchy rooted at a Window
44      */

45     public void ancestorRemoved(AncestorEvent JavaDoc event);
46
47     /**
48      * Called when either the source or one of its ancestors is moved.
49      */

50     public void ancestorMoved(AncestorEvent JavaDoc event);
51
52 }
53
54
55
Popular Tags