1. /*
  2. * @(#)ComboPopup.java 1.14 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing.plaf.basic;
  8. import java.awt.event.MouseListener;
  9. import java.awt.event.MouseMotionListener;
  10. import java.awt.event.KeyListener;
  11. import javax.swing.JList;
  12. /**
  13. * The interface which defines the methods required for the implementation of the popup
  14. * portion of a combo box.
  15. * <p>
  16. * <strong>Warning:</strong>
  17. * Serialized objects of this class will not be compatible with
  18. * future Swing releases. The current serialization support is
  19. * appropriate for short term storage or RMI between applications running
  20. * the same version of Swing. As of 1.4, support for long term storage
  21. * of all JavaBeans<sup><font size="-2">TM</font></sup>
  22. * has been added to the <code>java.beans</code> package.
  23. * Please see {@link java.beans.XMLEncoder}.
  24. *
  25. * @version 1.14 01/23/03
  26. * @author Tom Santos
  27. */
  28. public interface ComboPopup {
  29. /**
  30. * Shows the popup
  31. */
  32. public void show();
  33. /**
  34. * Hides the popup
  35. */
  36. public void hide();
  37. /**
  38. * Returns true if the popup is visible (currently being displayed).
  39. *
  40. * @return <code>true<code> if the component is visible; <code>false</code> otherwise.
  41. */
  42. public boolean isVisible();
  43. /**
  44. * Returns the list that is being used to draw the items in the combo box.
  45. * This method is highly implementation specific and should not be used
  46. * for general list manipulation.
  47. */
  48. public JList getList();
  49. /**
  50. * Returns a mouse listener that will be added to the combo box or null.
  51. * If this method returns null then it will not be added to the combo box.
  52. *
  53. * @return a <code>MouseListener</code> or null
  54. */
  55. public MouseListener getMouseListener();
  56. /**
  57. * Returns a mouse motion listener that will be added to the combo box or null.
  58. * If this method returns null then it will not be added to the combo box.
  59. *
  60. * @return a <code>MouseMotionListener</code> or null
  61. */
  62. public MouseMotionListener getMouseMotionListener();
  63. /**
  64. * Returns a key listener that will be added to the combo box or null.
  65. * If this method returns null then it will not be added to the combo box.
  66. */
  67. public KeyListener getKeyListener();
  68. /**
  69. * Called to inform the ComboPopup that the UI is uninstalling.
  70. * If the ComboPopup added any listeners in the component, it should remove them here.
  71. */
  72. public void uninstallingUI();
  73. }