public class ItemEvent extends AWTEvent
Modifier and Type | Field and Description |
---|---|
static int |
DESELECTED |
static int |
SELECTED |
ACTION_PERFORMED, ADJUSTMENT_EVENT, FOCUS_GAINED, FOCUS_LOST, GARBAGE_COLLECTION, INVOCATION_EVENT, ITEM_STATE_CHANGED, KEY_PRESSED, KEY_TYPED, LIST_SELECTION, MOUSE_EVENT, PAINT_EVENT, RESERVED_ID_MAX, SCROLL_EVENT, SYNC_EVENT, WINDOW_CLOSING, WINDOW_OPENED
Constructor and Description |
---|
ItemEvent(Component source_,
java.lang.Object item_,
int statechange_)
Constructs an ItemEvent object.
|
Modifier and Type | Method and Description |
---|---|
void |
consume()
Provides a way to flag the event as having been consumed,
so that it never reaches its destination component.
|
java.lang.Object |
getItem()
Get the item affected by the event.
|
int |
getStateChange() |
boolean |
isConsumed() |
public static final int SELECTED
public static final int DESELECTED
public ItemEvent(Component source_, java.lang.Object item_, int statechange_)
source_
- The object (such as a List) that originated the event.item_
- The object affected by the event.statechange_
- An integer that indicates whether the item was
selected or deselected.public void consume()
public boolean isConsumed()
public java.lang.Object getItem()
public int getStateChange()