org.zaval.lw.event
Class LwAWTEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.zaval.lw.event.LwAWTEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LwComponentEvent, LwContainerEvent, LwFocusEvent, LwKeyEvent, LwMouseEvent, LwWinEvent

public class LwAWTEvent
extends java.util.EventObject

This class is basic for all light weight events. Every light event class that inherits the class has to provide:

See Also:
Serialized Form

Field Summary
static int COMP_UID
          The component event UID.
static int CONT_UID
          The container event UID.
static int FOCUS_UID
          The focus event UID.
protected  int id
          The event id.
static int KEY_UID
          The key event UID.
static int MOTION_UID
          The mouse motion event UID.
static int MOUSE_UID
          The mouse event UID.
static int WIN_UID
          The window event UID.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LwAWTEvent(LwComponent target, int id)
          Constructs an event object with the specified source object and the event id.
 
Method Summary
 int getID()
          Gets the event id.
 LwComponent getLwComponent()
          Gets the source object of the event as LwComponent instance.
 int getUID()
          Gets the UID of the event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMP_UID

public static final int COMP_UID
The component event UID.

MOUSE_UID

public static final int MOUSE_UID
The mouse event UID.

KEY_UID

public static final int KEY_UID
The key event UID.

FOCUS_UID

public static final int FOCUS_UID
The focus event UID.

CONT_UID

public static final int CONT_UID
The container event UID.

MOTION_UID

public static final int MOTION_UID
The mouse motion event UID.

WIN_UID

public static final int WIN_UID
The window event UID.

id

protected int id
The event id.
Constructor Detail

LwAWTEvent

public LwAWTEvent(LwComponent target,
                  int id)
Constructs an event object with the specified source object and the event id.
Parameters:
target - the object where the event originated.
id - the specified event id.
Method Detail

getID

public int getID()
Gets the event id.
Returns:
an event id.

getLwComponent

public LwComponent getLwComponent()
Gets the source object of the event as LwComponent instance.
Returns:
a source object as LwComponent instance.

getUID

public int getUID()
Gets the UID of the event. The UID defines the event class.
Returns:
an UID.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org