Interface EventListener

public interface EventListener

An event listener interface defines the method used to dispatch events.

Due to the small device's limitations, there is not an event listener hierarchy.
Instead, events are classified by an integer value.
Negative values are reserved for future MWT extensions and 0 is used for undefined event types.

Field Summary
static int EVENT_ACTION
          Constant for action event types.
          Constant for undefined event types.
Method Summary
 void processEvent(int eventType, Component c, java.lang.Object[] args)
          Processes an event.

Field Detail


static final int EVENT_UNDEFINED
Constant for undefined event types.

See Also:
Constant Field Values


static final int EVENT_ACTION
Constant for action event types.

See Also:
Constant Field Values
Method Detail


void processEvent(int eventType,
                  Component c,
                  java.lang.Object[] args)
Processes an event.
Parameters depend on how the caller invokes the event. However, the event type should be an EventListener EVENT_* constant (or any custom event type) and the component should be the sender.

eventType - The event type
c - An optional component
args - Optional args

Copyright © 2007 MWT-Team. All Rights Reserved.