1. /*
  2. * @(#)MutableComboBoxModel.java 1.12 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. * A mutable version of <code>ComboBoxModel</code>.
  10. *
  11. * @version 1.12 12/19/03
  12. * @author Tom Santos
  13. */
  14. public interface MutableComboBoxModel extends ComboBoxModel {
  15. /**
  16. * Adds an item at the end of the model. The implementation of this method
  17. * should notify all registered <code>ListDataListener</code>s that the
  18. * item has been added.
  19. *
  20. * @param obj the <code>Object</code> to be added
  21. */
  22. public void addElement( Object obj );
  23. /**
  24. * Removes an item from the model. The implementation of this method should
  25. * should notify all registered <code>ListDataListener</code>s that the
  26. * item has been removed.
  27. *
  28. * @param obj the <code>Object</code> to be removed
  29. */
  30. public void removeElement( Object obj );
  31. /**
  32. * Adds an item at a specific index. The implementation of this method
  33. * should notify all registered <code>ListDataListener</code>s that the
  34. * item has been added.
  35. *
  36. * @param obj the <code>Object</code> to be added
  37. * @param index location to add the object
  38. */
  39. public void insertElementAt( Object obj, int index );
  40. /**
  41. * Removes an item at a specific index. The implementation of this method
  42. * should notify all registered <code>ListDataListener</code>s that the
  43. * item has been removed.
  44. *
  45. * @param index location of object to be removed
  46. */
  47. public void removeElementAt( int index );
  48. }