KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > ComboBoxEditor


1 /*
2  * @(#)ComboBoxEditor.java 1.13 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;
8
9 import java.awt.*;
10 import java.awt.event.*;
11
12 /**
13  * The editor component used for JComboBox components.
14  *
15  * @version 1.13 12/19/03
16  * @author Arnaud Weber
17  */

18 public interface ComboBoxEditor {
19   
20   /** Return the component that should be added to the tree hierarchy for
21     * this editor
22     */

23   public Component getEditorComponent();
24   
25   /** Set the item that should be edited. Cancel any editing if necessary **/
26   public void setItem(Object JavaDoc anObject);
27
28   /** Return the edited item **/
29   public Object JavaDoc getItem();
30
31   /** Ask the editor to start editing and to select everything **/
32   public void selectAll();
33
34   /** Add an ActionListener. An action event is generated when the edited item changes **/
35   public void addActionListener(ActionListener l);
36
37   /** Remove an ActionListener **/
38   public void removeActionListener(ActionListener l);
39 }
40
Popular Tags