1. /*
  2. * @(#)ItemListener.java 1.11 01/11/29
  3. *
  4. * Copyright 2002 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. * @see ItemSelectable
  19. * @see ItemEvent
  20. * @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/itemlistener.html">Tutorial: Writing an Item Listener</a>
  21. * @see <a href="http://www.awl.com/cp/javaseries/jcl1_2.html">Reference: The Java Class Libraries (update file)</a>
  22. *
  23. * @version 1.11 11/29/01
  24. * @author Amy Fowler
  25. */
  26. public interface ItemListener extends EventListener {
  27. /**
  28. * Invoked when an item has been selected or deselected.
  29. * The code written for this method performs the operations
  30. * that need to occur when an item is selected (or deselected).
  31. */
  32. void itemStateChanged(ItemEvent e);
  33. }