Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client
Class Event

    java.lang.Object
      com.google.gwt.core.client.JavaScriptObject
          com.google.gwt.user.client.Event

    public final class Event

extends JavaScriptObject

An opaque handle to a native DOM Event. An `Event` cannot be created directly. Instead, use the `Event` type when returning a native DOM event from JSNI methods. An `Event` passed back into JSNI becomes the original DOM event the `Event` was created from, and can be accessed in JavaScript code as expected. This is typically done by calling methods in the `DOM` class.

Field Summary
`static int` | `BUTTON_LEFT` The left mouse button (used in `DOM.eventGetButton(Event)`).
`static int` | `BUTTON_MIDDLE` The middle mouse button (used in `DOM.eventGetButton(Event)`).
`static int` | `BUTTON_RIGHT` The right mouse button (used in `DOM.eventGetButton(Event)`).
`static int` | `FOCUSEVENTS` A bit-mask covering both focus events (focus and blur).
`static int` | `KEYEVENTS` A bit-mask covering all keyboard events (down, up, and press).
`static int` | `MOUSEEVENTS` A bit-mask covering all mouse events (down, up, move, over, and out), but not click, dblclick, or wheel events.
`static int` | `ONBLUR` Fired when an element loses keyboard focus.
`static int` | `ONCHANGE` Fired when the value of an input element changes.
`static int` | `ONCLICK` Fired when the user clicks on an element.
`static int` | `ONDBLCLICK` Fired when the user double-clicks on an element.
`static int` | `ONERROR` Fired when an image encounters an error.
`static int` | `ONFOCUS` Fired when an element receives keyboard focus.
`static int` | `ONKEYDOWN` Fired when the user depresses a key.
`static int` | `ONKEYPRESS` Fired when the a character is generated from a keypress (either directly or through auto-repeat).
`static int` | `ONKEYUP` Fired when the user releases a key.
`static int` | `ONLOAD` Fired when an element (normally an IMG) finishes loading.
`static int` | `ONLOSECAPTURE` Fired when an element that has mouse capture loses it.
`static int` | `ONMOUSEDOWN` Fired when the user depresses a mouse button over an element.
`static int` | `ONMOUSEMOVE` Fired when the mouse is moved within an element's area.
`static int` | `ONMOUSEOUT` Fired when the mouse is moved out of an element's area.
`static int` | `ONMOUSEOVER` Fired when the mouse is moved into an element's area.
`static int` | `ONMOUSEUP` Fired when the user releases a mouse button over an element.
`static int` | `ONMOUSEWHEEL` Fired when the user scrolls the mouse wheel over an element.
`static int` | `ONSCROLL` Fired when a scrollable element's scroll offset changes.
`static int` | `UNDEFINED` Error code returned by DOM.getEventXXX methods when the actual integer value is undefined.

Fields inherited from class com.google.gwt.core.client.JavaScriptObject
`hostedModeReference`

Constructor Summary
`protected` | `Event()` Not directly instantiable.

Method Summary
`boolean` | `equals(java.lang.Object other)`
`int` | `hashCode()`
`java.lang.String` | `toString()`

Methods inherited from class com.google.gwt.core.client.JavaScriptObject
`createArray, createFunction, createObject`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### BUTTON_LEFT

    public static final int BUTTON_LEFT

  The left mouse button (used in `DOM.eventGetButton(Event)`).

  See Also:
    Constant Field Values

### BUTTON_MIDDLE

    public static final int BUTTON_MIDDLE

  The middle mouse button (used in `DOM.eventGetButton(Event)`).

  See Also:
    Constant Field Values

### BUTTON_RIGHT

    public static final int BUTTON_RIGHT

  The right mouse button (used in `DOM.eventGetButton(Event)`).

  See Also:
    Constant Field Values

### ONBLUR

    public static final int ONBLUR

  Fired when an element loses keyboard focus.

  See Also:
    Constant Field Values

### ONCHANGE

    public static final int ONCHANGE

  Fired when the value of an input element changes.

  See Also:
    Constant Field Values

### ONCLICK

    public static final int ONCLICK

  Fired when the user clicks on an element.

  See Also:
    Constant Field Values

### ONDBLCLICK

    public static final int ONDBLCLICK

  Fired when the user double-clicks on an element.

  See Also:
    Constant Field Values

### ONERROR

    public static final int ONERROR

  Fired when an image encounters an error.

  See Also:
    Constant Field Values

### ONFOCUS

    public static final int ONFOCUS

  Fired when an element receives keyboard focus.

  See Also:
    Constant Field Values

### ONKEYDOWN

    public static final int ONKEYDOWN

  Fired when the user depresses a key.

  See Also:
    Constant Field Values

### ONKEYPRESS

    public static final int ONKEYPRESS

  Fired when the a character is generated from a keypress (either directly or through auto-repeat).

  See Also:
    Constant Field Values

### ONKEYUP

    public static final int ONKEYUP

  Fired when the user releases a key.

  See Also:
    Constant Field Values

### ONLOAD

    public static final int ONLOAD

  Fired when an element (normally an IMG) finishes loading.

  See Also:
    Constant Field Values

### ONLOSECAPTURE

    public static final int ONLOSECAPTURE

  Fired when an element that has mouse capture loses it.

  See Also:
    Constant Field Values

### ONMOUSEDOWN

    public static final int ONMOUSEDOWN

  Fired when the user depresses a mouse button over an element.

  See Also:
    Constant Field Values

### ONMOUSEMOVE

    public static final int ONMOUSEMOVE

  Fired when the mouse is moved within an element's area.

  See Also:
    Constant Field Values

### ONMOUSEOUT

    public static final int ONMOUSEOUT

  Fired when the mouse is moved out of an element's area.

  See Also:
    Constant Field Values

### ONMOUSEOVER

    public static final int ONMOUSEOVER

  Fired when the mouse is moved into an element's area.

  See Also:
    Constant Field Values

### ONMOUSEUP

    public static final int ONMOUSEUP

  Fired when the user releases a mouse button over an element.

  See Also:
    Constant Field Values

### ONMOUSEWHEEL

    public static final int ONMOUSEWHEEL

  Fired when the user scrolls the mouse wheel over an element.

  See Also:
    Constant Field Values

### ONSCROLL

    public static final int ONSCROLL

  Fired when a scrollable element's scroll offset changes.

  See Also:
    Constant Field Values

### FOCUSEVENTS

    public static final int FOCUSEVENTS

  A bit-mask covering both focus events (focus and blur).

  See Also:
    Constant Field Values

### KEYEVENTS

    public static final int KEYEVENTS

  A bit-mask covering all keyboard events (down, up, and press).

  See Also:
    Constant Field Values

### MOUSEEVENTS

    public static final int MOUSEEVENTS

  A bit-mask covering all mouse events (down, up, move, over, and out), but not click, dblclick, or wheel events.

  See Also:
    Constant Field Values

### UNDEFINED

    public static final int UNDEFINED

  Error code returned by DOM.getEventXXX methods when the actual integer value is undefined. For example, DOM.getEventKeyCode returns UNDEFINED for some non-keyboard events. For some events, some browsers return undefined while others return data for certain events.

  See Also:
    Constant Field Values

Constructor Detail

### Event

    protected Event()

  Not directly instantiable. Subclasses should also define a protected no-arg constructor to prevent client code from directly instantiating the class.

Method Detail

### equals

    public boolean equals(java.lang.Object other)

  Overrides:
    `equals` in class `JavaScriptObject`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `JavaScriptObject`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `JavaScriptObject`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD