java.awt.event
Class ItemEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
              |
              +--java.awt.event.ItemEvent
All Implemented Interfaces:
Serializable
public class ItemEvent
extends AWTEvent

A semantic event which indicates that an item was selected or deselected. This high-level event is generated by an ItemSelectable object (such as a List) when an item is selected or deselected by the user. The event is passed to every ItemListener object which registered to receive such events using the component's addItemListener method.

The object that implements the ItemListener interface gets this ItemEvent when the event occurs. The listener is spared the details of processing individual mouse movements and mouse clicks, and can instead process a "meaningful" (semantic) event like "item selected" or "item deselected".

Since:
1.1
See Also:
ItemSelectable, ItemListener, Tutorial: Writing an Item Listener, Reference: The Java Class Libraries (update file), Serialized Form

 

Field Summary

static int DESELECTED
    This state-change-value indicates that a selected item was deselected.
static int ITEM_FIRST
    The first number in the range of ids used for item events.
static int ITEM_LAST
    The last number in the range of ids used for item events.
static int ITEM_STATE_CHANGED
    This event id indicates that an item's state changed.
static int SELECTED