Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class java.awt.AWTEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.AWTEvent
Subclasses:
ComponentEvent

public abstract class AWTEvent
extends EventObject
The root event class for all AWT events. This class and its subclasses supercede the original java.awt.Event class. Subclasses of this root AWTEvent class defined outside of the java.awt.event package should define event ID values greater than the value defined by RESERVED_ID_MAX. The event masks defined in this class are needed ONLY by component subclasses which are using Component.enableEvents() to select for event types not selected by registered listeners. If a listener is registered on a component, the appropriate event mask is already set internally by the component.

Version:
1.27 06/29/98
See Also:
enableEvents, ComponentEvent, java.awt.event.FocusEvent, java.awt.event.KeyEvent, java.awt.event.MouseEvent, WindowEvent, java.awt.event.ActionEvent, java.awt.event.AdjustmentEvent, java.awt.event.ItemEvent, java.awt.event.TextEvent, Serialized Form

Field Summary
static long ACTION_EVENT_MASK
          The event mask for selecting action events.
static long ADJUSTMENT_EVENT_MASK
          The event mask for selecting adjustment events.
static long COMPONENT_EVENT_MASK
          The event mask for selecting component events.
boolean consumed
           
static long CONTAINER_EVENT_MASK
          The event mask for selecting container events.
long data
           
static long FOCUS_EVENT_MASK
          The event mask for selecting focus events.
int id
           
static long INPUT_METHOD_EVENT_MASK
          The event mask for selecting input method events.
static long INPUT_METHODS_ENABLED_MASK
          The pseudo event mask for enabling input methods.
static long ITEM_EVENT_MASK
          The event mask for selecting item events.
static long KEY_EVENT_MASK
          The event mask for selecting key events.
static long MOUSE_EVENT_MASK
          The event mask for selecting mouse events.
static long MOUSE_MOTION_EVENT_MASK
          The event mask for selecting mouse motion events.
static int RESERVED_ID_MAX
          The maximum value for reserved AWT event IDs.
static long serialVersionUID
           
static long TEXT_EVENT_MASK
          The event mask for selecting text events.
static long WINDOW_EVENT_MASK
          The event mask for selecting window events.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AWTEvent(Event event)
          Constructs an AWTEvent object from the parameters of a 1.0-style event.
AWTEvent(Object source, int id)
          Constructs an AWTEvent object with the specified source object and type.
 
Method Summary
void consume()
           
Event convertToOld()
           
int getID()
          Returns the event type.
boolean isConsumed()
           
void movePrivateDataInto(AWTEvent other)
          "Moves" any private data into "other."
String paramString()
           
void setSource(Object newSource)
           
String toString()
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notifyAll, notify, registerNatives, toString, wait, wait, wait
 

Field Detail

data

private transient long data

id

protected int id

consumed

protected boolean consumed

COMPONENT_EVENT_MASK

public static final long COMPONENT_EVENT_MASK
The event mask for selecting component events.

CONTAINER_EVENT_MASK

public static final long CONTAINER_EVENT_MASK
The event mask for selecting container events.

FOCUS_EVENT_MASK

public static final long FOCUS_EVENT_MASK
The event mask for selecting focus events.

KEY_EVENT_MASK

public static final long KEY_EVENT_MASK
The event mask for selecting key events.

MOUSE_EVENT_MASK

public static final long MOUSE_EVENT_MASK
The event mask for selecting mouse events.

MOUSE_MOTION_EVENT_MASK

public static final long MOUSE_MOTION_EVENT_MASK
The event mask for selecting mouse motion events.

WINDOW_EVENT_MASK

public static final long WINDOW_EVENT_MASK
The event mask for selecting window events.

ACTION_EVENT_MASK

public static final long ACTION_EVENT_MASK
The event mask for selecting action events.

ADJUSTMENT_EVENT_MASK

public static final long ADJUSTMENT_EVENT_MASK
The event mask for selecting adjustment events.

ITEM_EVENT_MASK

public static final long ITEM_EVENT_MASK
The event mask for selecting item events.

TEXT_EVENT_MASK

public static final long TEXT_EVENT_MASK
The event mask for selecting text events.

INPUT_METHOD_EVENT_MASK

public static final long INPUT_METHOD_EVENT_MASK
The event mask for selecting input method events.

INPUT_METHODS_ENABLED_MASK

static final long INPUT_METHODS_ENABLED_MASK
The pseudo event mask for enabling input methods. We're using one bit in the eventMask so we don't need a separate field inputMethodsEnabled.

RESERVED_ID_MAX

public static final int RESERVED_ID_MAX
The maximum value for reserved AWT event IDs. Programs defining their own event IDs should use IDs greater than this value.

serialVersionUID

private static final long serialVersionUID
Constructor Detail

AWTEvent

public AWTEvent(Event event)
Constructs an AWTEvent object from the parameters of a 1.0-style event.
Parameters:
event - the old-style event

AWTEvent

public AWTEvent(Object source,
                int id)
Constructs an AWTEvent object with the specified source object and type.
Parameters:
source - the object where the event originated
Method Detail

getID

public int getID()
Returns the event type.

toString

public String toString()
Overrides:
toString in class EventObject

paramString

public String paramString()

consume

protected void consume()

isConsumed

protected boolean isConsumed()

convertToOld

Event convertToOld()

setSource

void setSource(Object newSource)

movePrivateDataInto

void movePrivateDataInto(AWTEvent other)
"Moves" any private data into "other." The data is copied, and any references data structures in this object are set to null.

Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD