KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > plaf > basic > ComboPopup


1 /*
2  * @(#)ComboPopup.java 1.15 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 javax.swing.plaf.basic;
9
10 import java.awt.event.MouseListener JavaDoc;
11 import java.awt.event.MouseMotionListener JavaDoc;
12 import java.awt.event.KeyListener JavaDoc;
13 import javax.swing.JList JavaDoc;
14
15
16 /**
17  * The interface which defines the methods required for the implementation of the popup
18  * portion of a combo box.
19  * <p>
20  * <strong>Warning:</strong>
21  * Serialized objects of this class will not be compatible with
22  * future Swing releases. The current serialization support is
23  * appropriate for short term storage or RMI between applications running
24  * the same version of Swing. As of 1.4, support for long term storage
25  * of all JavaBeans<sup><font size="-2">TM</font></sup>
26  * has been added to the <code>java.beans</code> package.
27  * Please see {@link java.beans.XMLEncoder}.
28  *
29  * @version 1.15 12/19/03
30  * @author Tom Santos
31  */

32 public interface ComboPopup {
33     /**
34      * Shows the popup
35      */

36     public void show();
37
38     /**
39      * Hides the popup
40      */

41     public void hide();
42
43     /**
44      * Returns true if the popup is visible (currently being displayed).
45      *
46      * @return <code>true<code> if the component is visible; <code>false</code> otherwise.
47      */

48     public boolean isVisible();
49
50     /**
51      * Returns the list that is being used to draw the items in the combo box.
52      * This method is highly implementation specific and should not be used
53      * for general list manipulation.
54      */

55     public JList JavaDoc getList();
56
57     /**
58      * Returns a mouse listener that will be added to the combo box or null.
59      * If this method returns null then it will not be added to the combo box.
60      *
61      * @return a <code>MouseListener</code> or null
62      */

63     public MouseListener JavaDoc getMouseListener();
64
65     /**
66      * Returns a mouse motion listener that will be added to the combo box or null.
67      * If this method returns null then it will not be added to the combo box.
68      *
69      * @return a <code>MouseMotionListener</code> or null
70      */

71     public MouseMotionListener JavaDoc getMouseMotionListener();
72
73     /**
74      * Returns a key listener that will be added to the combo box or null.
75      * If this method returns null then it will not be added to the combo box.
76      */

77     public KeyListener JavaDoc getKeyListener();
78
79     /**
80      * Called to inform the ComboPopup that the UI is uninstalling.
81      * If the ComboPopup added any listeners in the component, it should remove them here.
82      */

83     public void uninstallingUI();
84 }
85
Popular Tags