1. /*
  2. * @(#)ItemSelectable.java 1.11 00/02/02
  3. *
  4. * Copyright 1996-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 java.awt;
  11. import java.awt.event.*;
  12. /**
  13. * The interface for objects which contain a set of items for
  14. * which zero or more can be selected.
  15. *
  16. * @version 1.11 02/02/00
  17. * @author Amy Fowler
  18. */
  19. public interface ItemSelectable {
  20. /**
  21. * Returns the selected items or null if no items are selected.
  22. */
  23. public Object[] getSelectedObjects();
  24. /**
  25. * Add a listener to recieve item events when the state of
  26. * an item changes.
  27. * If l is null, no exception is thrown and no action is performed.
  28. *
  29. * @param l the listener to recieve events
  30. * @see ItemEvent
  31. */
  32. public void addItemListener(ItemListener l);
  33. /**
  34. * Removes an item listener.
  35. * If l is null, no exception is thrown and no action is performed.
  36. *
  37. * @param l the listener being removed
  38. * @see ItemEvent
  39. */
  40. public void removeItemListener(ItemListener l);
  41. }