1. /*
  2. * @(#)ItemListener.java 1.17 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 java.awt.event;
  8. import java.util.EventListener;
  9. /**
  10. * The listener interface for receiving item events.
  11. * The class that is interested in processing an item event
  12. * implements this interface. The object created with that
  13. * class is then registered with a component using the
  14. * component's <code>addItemListener</code> method. When an
  15. * item-selection event occurs, the listener object's
  16. * <code>itemStateChanged</code> method is invoked.
  17. *
  18. * @author Amy Fowler
  19. * @version 1.17 01/23/03
  20. *
  21. * @see java.awt.ItemSelectable
  22. * @see ItemEvent
  23. * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/itemlistener.html">Tutorial: Writing an Item Listener</a>
  24. * @see <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a>
  25. *
  26. * @since 1.1
  27. */
  28. public interface ItemListener extends EventListener {
  29. /**
  30. * Invoked when an item has been selected or deselected by the user.
  31. * The code written for this method performs the operations
  32. * that need to occur when an item is selected (or deselected).
  33. */
  34. void itemStateChanged(ItemEvent e);
  35. }