ItemEvents are generated by objects that implement the ItemSelectable interface. Choice is one example of such an object.
public class java.awt.event.ItemEvent extends java.awt.AWTEvent { // Constants public final static int DESELECTED; public final static int ITEM_FIRST; public final static int ITEM_LAST; public final static int ITEM_STATE_CHANGED; public final static int SELECTED; // Constructors public ItemEvent (ItemSelectable source, int id, Object item, int stateChange); // Instance Methods public Object getItem(); public ItemSelectable getItemSelectable(); public int getStateChange(); public String paramString(); }
Indicates that an item was deselected.
Specifies the beginning range of item event ID values.
Specifies the ending range of item event ID values.
An event type indicating that an item was selected or deselected.
Indicates that an item was selected.
The object that generated the event.
The type ID of the event.
The item whose state is changing.
Either SELECTED or DESELECTED.
Constructs an ItemEvent with the given characteristics.
The item pertaining to this event.
Returns the item whose changed state triggered this event.
The source of this event.
Returns an object that implements the ItemSelectable interface.
The change in state that triggered this event. The new state is returned.
This method will return SELECTED or DESELECTED.
String with current settings of ItemEvent.
AWTEvent.paramString()
Helper method for toString() to generate string of current settings.
AWTEvent, ItemSelectable, ItemListener