charva.awt.event

Class ItemEvent


public class ItemEvent
extends AWTEvent

An event which indicates that an item was selected or deselected.

Field Summary

static int
DESELECTED
static int
SELECTED

Fields inherited from class charva.awt.event.AWTEvent

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 Summary

ItemEvent(Component source_, Object item_, int statechange_)
Constructs an ItemEvent object.

Method Summary

void
consume()
Provides a way to flag the event as having been consumed, so that it never reaches its destination component.
Object
getItem()
Get the item affected by the event.
int
getStateChange()
boolean
isConsumed()

Methods inherited from class charva.awt.event.AWTEvent

getID

Field Details

DESELECTED

public static final int DESELECTED
Field Value:
101

SELECTED

public static final int SELECTED
Field Value:
100

Constructor Details

ItemEvent

public ItemEvent(Component source_,
                 Object item_,
                 int statechange_)
Constructs an ItemEvent object.
Parameters:
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.

Method Details

consume

public void consume()
Provides a way to flag the event as having been consumed, so that it never reaches its destination component.

getItem

public Object getItem()
Get the item affected by the event.

getStateChange

public int getStateChange()

isConsumed

public boolean isConsumed()