1. /*
  2. * @(#)ComboPopup.java 1.9 00/02/02
  3. *
  4. * Copyright 1998-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package javax.swing.plaf.basic;
  11. import java.awt.event.MouseListener;
  12. import java.awt.event.MouseMotionListener;
  13. import java.awt.event.KeyListener;
  14. import javax.swing.JList;
  15. /**
  16. * The interface which defines the kind of popup menu that BasicComboBoxUI requires.
  17. * Classes that implement this interface don't have to extend JPopupMenu. This interface
  18. * demands very little so alternatives to JPopupMenu can be used.
  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 appropriate
  23. * for short term storage or RMI between applications running the same
  24. * version of Swing. A future release of Swing will provide support for
  25. * long term persistence.
  26. *
  27. * @version 1.9 02/02/00
  28. * @author Tom Santos
  29. */
  30. public interface ComboPopup {
  31. /**
  32. * Shows the popup
  33. */
  34. public void show();
  35. /**
  36. * Hides the popup
  37. */
  38. public void hide();
  39. /**
  40. * Returns whether or not the popup is visible
  41. */
  42. public boolean isVisible();
  43. /**
  44. * Returns the list that is being used to draw the items in the JComboBox.
  45. */
  46. public JList getList();
  47. /**
  48. * Returns a mouse listener that shows and hides the popup.
  49. */
  50. public MouseListener getMouseListener();
  51. /**
  52. * Returns a mouse motion listener that makes the popup act like a menu.
  53. */
  54. public MouseMotionListener getMouseMotionListener();
  55. /**
  56. * Returns a key listener that shows and hides the popup.
  57. */
  58. public KeyListener getKeyListener();
  59. /**
  60. * Called to inform the ComboPopup that the UI is uninstalling.
  61. * If the ComboPopup added any listeners in the component, it should remove them here.
  62. */
  63. public void uninstallingUI();
  64. }