    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class java.awt.AWTEvent

    java.lang.Object
       |
       +----java.util.EventObject
               |
               +----java.awt.AWTEvent

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.

See Also:
  enableEvents, ComponentEvent, FocusEvent, KeyEvent, MouseEvent, WindowEvent, ActionEvent, AdjustmentEvent, ItemEvent, TextEvent

##

ACTION_EVENT_MASK
  The event mask for selecting action events.
ADJUSTMENT_EVENT_MASK
  The event mask for selecting adjustment events.
COMPONENT_EVENT_MASK
  The event mask for selecting component events.
consumed
CONTAINER_EVENT_MASK
  The event mask for selecting container events.
FOCUS_EVENT_MASK
  The event mask for selecting focus events.
id
ITEM_EVENT_MASK
  The event mask for selecting item events.
KEY_EVENT_MASK
  The event mask for selecting key events.
MOUSE_EVENT_MASK
  The event mask for selecting mouse events.
MOUSE_MOTION_EVENT_MASK
  The event mask for selecting mouse motion events.
RESERVED_ID_MAX
  The maximum value for reserved AWT event IDs.
TEXT_EVENT_MASK
  The event mask for selecting text events.
WINDOW_EVENT_MASK
  The event mask for selecting window events.

##

AWTEvent(Event)
  Constructs an AWTEvent object from the parameters of a 1.0-style event.
AWTEvent(Object, int)
  Constructs an AWTEvent object with the specified source object and type.

##

consume()
getID()
  Returns the event type.
isConsumed()
paramString()
toString()
  Returns a string representation of the object.

##

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.

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.

##

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

##

getID

     public int getID()

  Returns the event type.

toString

     public String toString()

  Returns a string representation of the object.

  Overrides:
    toString in class EventObject

paramString

     public String paramString()

consume

     protected void consume()

isConsumed

     protected boolean isConsumed()

    All Packages  Class Hierarchy  This Package  Previous  Next  Index

Submit a bug or feature - Version 1.1.8 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1995-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.