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. import java.awt.*;
  9. import java.awt.event.*;
  10. /**
  11. * The editor component used for JComboBox components.
  12. *
  13. * @version 1.13 12/19/03
  14. * @author Arnaud Weber
  15. */
  16. public interface ComboBoxEditor {
  17. /** Return the component that should be added to the tree hierarchy for
  18. * this editor
  19. */
  20. public Component getEditorComponent();
  21. /** Set the item that should be edited. Cancel any editing if necessary **/
  22. public void setItem(Object anObject);
  23. /** Return the edited item **/
  24. public Object getItem();
  25. /** Ask the editor to start editing and to select everything **/
  26. public void selectAll();
  27. /** Add an ActionListener. An action event is generated when the edited item changes **/
  28. public void addActionListener(ActionListener l);
  29. /** Remove an ActionListener **/
  30. public void removeActionListener(ActionListener l);
  31. }