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.
Component#enableEvents, Toolkit#addAWTEventListener, java.awt.event.ActionEvent , java.awt.event.AdjustmentEvent , java.awt.event.ComponentEvent , java.awt.event.ContainerEvent , java.awt.event.FocusEvent , java.awt.event.InputMethodEvent , java.awt.event.InvocationEvent , java.awt.event.ItemEvent , java.awt.event.HierarchyEvent , java.awt.event.KeyEvent , java.awt.event.MouseEvent , java.awt.event.MouseWheelEvent , java.awt.event.PaintEvent , java.awt.event.TextEvent , java.awt.event.WindowEvent
| Modifier and Type | Field and Description |
|---|---|
| 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. |
| private byte[] | |
| public static final long | COMPONENT_EVENT_MASK
The event mask for selecting component events. |
| 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. |
| 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. |
| pack-priv transient boolean | |
| public static final long | HIERARCHY_BOUNDS_EVENT_MASK
The event mask for selecting hierarchy bounds events. |
| public static final long | HIERARCHY_EVENT_MASK
The event mask for selecting hierarchy events. |
| protected int | id
The event's id. |
| public static final long | INPUT_METHOD_EVENT_MASK
The event mask for selecting input method events. |
| pack-priv static final long | INPUT_METHODS_ENABLED_MASK
The pseudo event mask for enabling input methods. |
| public static final long | INVOCATION_EVENT_MASK
The event mask for selecting invocation events. |
| pack-priv transient boolean | |
| private transient boolean | isSystemGenerated
Indicates whether this AWTEvent was generated by the system as opposed to by user code. |
| public static final long | ITEM_EVENT_MASK
The event mask for selecting item 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 | MOUSE_WHEEL_EVENT_MASK
The event mask for selecting mouse wheel events. |
| public static final long | PAINT_EVENT_MASK
The event mask for selecting paint events. |
| public static final int | RESERVED_ID_MAX
The maximum value for reserved AWT event IDs. |
| private static final long | serialVersionUID
Use serialVersionUID from JDK 1.1 for interoperability.
|
| public static final long | TEXT_EVENT_MASK
The event mask for selecting text events. |
| public static final long | WINDOW_EVENT_MASK
The event mask for selecting window events. |
| public static final long | WINDOW_FOCUS_EVENT_MASK
The event mask for selecting window focus events. |
| public static final long | WINDOW_STATE_EVENT_MASK
The event mask for selecting window state events. |
| Access | Constructor and Description |
|---|---|
| public | AWTEvent(Event
the old-style event event)
Deprecated
since 9. It is recommended that
AWTEvent(Object, int) be used
instead
Constructs an AWTEvent object from the parameters of a 1.0-style event. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| pack-priv Event | convertToOld()
References Deprecated
Event is deprecated or references (maybe indirectly) at least one deprecated element.
Converts a new event to an old one (used for compatibility). |
| pack-priv void | |
| pack-priv void | |
| public int | |
| private static native void | |
| protected boolean | Returns: true if this event has been consumed;
otherwise falseReturns whether this event has been consumed. |
| private native void | |
| public String | Returns: a string representation of this eventReturns a string representing the state of this |
| public void | |
| public String |
| ACTION_EVENT_MASK | back to summary |
|---|---|
| public static final long ACTION_EVENT_MASK The event mask for selecting action events. | |
| ADJUSTMENT_EVENT_MASK | back to summary |
|---|---|
| public static final long ADJUSTMENT_EVENT_MASK The event mask for selecting adjustment events. | |
| bdata | back to summary |
|---|---|
| private byte[] bdata | |
| COMPONENT_EVENT_MASK | back to summary |
|---|---|
| public static final long COMPONENT_EVENT_MASK The event mask for selecting component events. | |
| consumed | back to summary |
|---|---|
| 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.
| |
| CONTAINER_EVENT_MASK | back to summary |
|---|---|
| public static final long CONTAINER_EVENT_MASK The event mask for selecting container events. | |
| FOCUS_EVENT_MASK | back to summary |
|---|---|
| public static final long FOCUS_EVENT_MASK The event mask for selecting focus events. | |
| focusManagerIsDispatching | back to summary |
|---|---|
| pack-priv transient boolean focusManagerIsDispatching | |
| HIERARCHY_BOUNDS_EVENT_MASK | back to summary |
|---|---|
| public static final long HIERARCHY_BOUNDS_EVENT_MASK The event mask for selecting hierarchy bounds events. | |
| HIERARCHY_EVENT_MASK | back to summary |
|---|---|
| public static final long HIERARCHY_EVENT_MASK The event mask for selecting hierarchy events. | |
| id | back to summary |
|---|---|
| protected int id The event's id. | |
| INPUT_METHOD_EVENT_MASK | back to summary |
|---|---|
| public static final long INPUT_METHOD_EVENT_MASK The event mask for selecting input method events. | |
| INPUT_METHODS_ENABLED_MASK | back to summary |
|---|---|
| pack-priv 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. | |
| INVOCATION_EVENT_MASK | back to summary |
|---|---|
| public static final long INVOCATION_EVENT_MASK The event mask for selecting invocation events. | |
| isPosted | back to summary |
|---|---|
| pack-priv transient boolean isPosted | |
| isSystemGenerated | back to summary |
|---|---|
| private transient boolean isSystemGenerated Indicates whether this AWTEvent was generated by the system as opposed to by user code. | |
| ITEM_EVENT_MASK | back to summary |
|---|---|
| public static final long ITEM_EVENT_MASK The event mask for selecting item events. | |
| KEY_EVENT_MASK | back to summary |
|---|---|
| public static final long KEY_EVENT_MASK The event mask for selecting key events. | |
| MOUSE_EVENT_MASK | back to summary |
|---|---|
| public static final long MOUSE_EVENT_MASK The event mask for selecting mouse events. | |
| MOUSE_MOTION_EVENT_MASK | back to summary |
|---|---|
| public static final long MOUSE_MOTION_EVENT_MASK The event mask for selecting mouse motion events. | |
| MOUSE_WHEEL_EVENT_MASK | back to summary |
|---|---|
| public static final long MOUSE_WHEEL_EVENT_MASK The event mask for selecting mouse wheel events.
| |
| PAINT_EVENT_MASK | back to summary |
|---|---|
| public static final long PAINT_EVENT_MASK The event mask for selecting paint events. | |
| RESERVED_ID_MAX | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Use serialVersionUID from JDK 1.1 for interoperability. | |
| TEXT_EVENT_MASK | back to summary |
|---|---|
| public static final long TEXT_EVENT_MASK The event mask for selecting text events. | |
| WINDOW_EVENT_MASK | back to summary |
|---|---|
| public static final long WINDOW_EVENT_MASK The event mask for selecting window events. | |
| WINDOW_FOCUS_EVENT_MASK | back to summary |
|---|---|
| public static final long WINDOW_FOCUS_EVENT_MASK The event mask for selecting window focus events.
| |
| WINDOW_STATE_EVENT_MASK | back to summary |
|---|---|
| public static final long WINDOW_STATE_EVENT_MASK The event mask for selecting window state events.
| |
| AWTEvent | back to summary |
|---|---|
| public AWTEvent(Event event)
Constructs an AWTEvent object from the parameters of a 1.0-style event.
| |
| AWTEvent | back to summary |
|---|---|
| public AWTEvent(Object source, int id) Constructs an AWTEvent object with the specified source object and type.
| |
| consume | back to summary |
|---|---|
| protected void consume() Consumes this event, if this event can be consumed. Only low-level, system events can be consumed | |
| convertToOld | back to summary |
|---|---|
| pack-priv Event convertToOld()
References Deprecated
See corresponding docs for further information. 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.
| |
| copyPrivateDataInto | back to summary |
|---|---|
| pack-priv 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. | |
| dispatched | back to summary |
|---|---|
| pack-priv void dispatched() | |
| getID | back to summary |
|---|---|
| public int getID() Returns the event type.
| |
| initIDs | back to summary |
|---|---|
| private static native void initIDs() Initialize JNI field and method IDs for fields that may be accessed from C. | |
| isConsumed | back to summary |
|---|---|
| protected boolean isConsumed() Returns whether this event has been consumed.
| |
| nativeSetSource | back to summary |
|---|---|
| private native void nativeSetSource(ComponentPeer peer) | |
| paramString | back to summary |
|---|---|
| public String paramString() Returns a string representing the state of this
| |
| setSource | back to summary |
|---|---|
| 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a String representation of this object. | |