Save This Page
Home » openjdk-7 » java » awt » [javadoc | source]
java.awt
abstract public class: AWTEvent [javadoc | source]
java.lang.Object
   java.util.EventObject
      java.awt.AWTEvent

All Implemented Interfaces:
    Serializable

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 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.

The masks are also used to specify to which types of events an AWTEventListener should listen. The masks are bitwise-ORed together and passed to Toolkit.addAWTEventListener.

Field Summary
protected  int id    The event's id. 
protected  boolean consumed    Controls whether or not the event is sent back down to the peer once the source has processed it - false means it's sent to the peer; true means it's not. Semantic events always have a 'true' value since they were generated by the peer in response to a low-level event. 
transient  boolean focusManagerIsDispatching     
transient  boolean isPosted     
public static final  long COMPONENT_EVENT_MASK    The event mask for selecting component events. 
public static final  long CONTAINER_EVENT_MASK    The event mask for selecting container events. 
public static final  long FOCUS_EVENT_MASK    The event mask for selecting focus events. 
public static final  long KEY_EVENT_MASK    The event mask for selecting key events. 
public static final  long MOUSE_EVENT_MASK    The event mask for selecting mouse events. 
public static final  long MOUSE_MOTION_EVENT_MASK    The event mask for selecting mouse motion events. 
public static final  long WINDOW_EVENT_MASK    The event mask for selecting window events. 
public static final  long ACTION_EVENT_MASK    The event mask for selecting action events. 
public static final  long ADJUSTMENT_EVENT_MASK    The event mask for selecting adjustment events. 
public static final  long ITEM_EVENT_MASK    The event mask for selecting item events. 
public static final  long TEXT_EVENT_MASK    The event mask for selecting text events. 
public static final  long INPUT_METHOD_EVENT_MASK    The event mask for selecting input method events. 
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. 
public static final  long PAINT_EVENT_MASK    The event mask for selecting paint events. 
public static final  long INVOCATION_EVENT_MASK    The event mask for selecting invocation events. 
public static final  long HIERARCHY_EVENT_MASK    The event mask for selecting hierarchy events. 
public static final  long HIERARCHY_BOUNDS_EVENT_MASK    The event mask for selecting hierarchy bounds events. 
public static final  long MOUSE_WHEEL_EVENT_MASK    The event mask for selecting mouse wheel events.
    since: 1.4 -
 
public static final  long WINDOW_STATE_EVENT_MASK    The event mask for selecting window state events.
    since: 1.4 -
 
public static final  long WINDOW_FOCUS_EVENT_MASK    The event mask for selecting window focus events.
    since: 1.4 -
 
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. 
Fields inherited from java.util.EventObject:
source
Constructor:
 public AWTEvent(Event event) 
    Constructs an AWTEvent object from the parameters of a 1.0-style event.
    Parameters:
    event - the old-style event
 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
    id - the event type
Method from java.awt.AWTEvent Summary:
consume,   convertToOld,   copyPrivateDataInto,   dispatched,   getAccessControlContext,   getID,   isConsumed,   paramString,   setSource,   toString
Methods from java.util.EventObject:
getSource,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.AWTEvent Detail:
 protected  void consume() 
    Consumes this event, if this event can be consumed. Only low-level, system events can be consumed
 Event convertToOld() 
    Converts a new event to an old one (used for compatibility). If the new event cannot be converted (because no old equivalent exists) then this returns null. Note: this method is here instead of in each individual new event class in java.awt.event because we don't want to make it public and it needs to be called from java.awt.
  void copyPrivateDataInto(AWTEvent that) 
    Copies all private data from this event into that. Space is allocated for the copied data that will be freed when the that is finalized. Upon completion, this event is not changed.
  void dispatched() 
 final AccessControlContext getAccessControlContext() 
 public int getID() 
    Returns the event type.
 protected boolean isConsumed() 
    Returns whether this event has been consumed.
 public String paramString() 
    Returns a string representing the state of this Event. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
 public  void setSource(Object newSource) 
    Retargets an event to a new source. This method is typically used to retarget an event to a lightweight child Component of the original heavyweight source.

    This method is intended to be used only by event targeting subsystems, such as client-defined KeyboardFocusManagers. It is not for general client use.

 public String toString() 
    Returns a String representation of this object.