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.event.dom.client
Class MouseEvent<H extends EventHandler>

    java.lang.Object
      com.google.gwt.event.shared.GwtEvent<H>
          com.google.gwt.event.dom.client.DomEvent<H>
              com.google.gwt.event.dom.client.MouseEvent<H>

Type Parameters:
  `H` - handler type

All Implemented Interfaces:
  HasNativeEvent

Direct Known Subclasses:
  MouseDownEvent, MouseMoveEvent, MouseOutEvent, MouseOverEvent, MouseUpEvent, MouseWheelEvent

    public abstract class MouseEvent<H extends EventHandler>

extends DomEvent<H>

Abstract class representing mouse events.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.event.dom.client.DomEvent
`DomEvent.Type<H extends EventHandler>`

Constructor Summary
`MouseEvent()`

Method Summary
`int` | `getClientX()` Gets the mouse x-position within the browser window's client area.
`int` | `getClientY()` Gets the mouse y-position within the browser window's client area.
`int` | `getNativeButton()` Gets the button value.
`int` | `getRelativeX(Element target)` Gets the mouse x-position relative to a given element.
`int` | `getRelativeY(Element target)` Gets the mouse y-position relative to a given element.
`int` | `getScreenX()` Gets the mouse x-position on the user's display.
`int` | `getScreenY()` Gets the mouse y-position on the user's display.
`int` | `getX()` Gets the mouse x-position relative to the event's current target element.
`int` | `getY()` Gets the mouse y-position relative to the event's current target element.
`boolean` | `isAltKeyDown()` Is `alt` key down.
`boolean` | `isControlKeyDown()` Is `control` key down.
`boolean` | `isMetaKeyDown()` Is `meta` key down.
`boolean` | `isShiftKeyDown()` Is `shift` key down.

Methods inherited from class com.google.gwt.event.dom.client.DomEvent
`fireNativeEvent, fireNativeEvent, getAssociatedType, getNativeEvent, getRelativeElement, preventDefault, setNativeEvent, setRelativeElement, stopPropagation`

Methods inherited from class com.google.gwt.event.shared.GwtEvent
`assertLive, dispatch, getSource, isLive, kill, revive, toDebugString, toString`

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

Constructor Detail

### MouseEvent

    public MouseEvent()

Method Detail

### getClientX

    public int getClientX()

  Gets the mouse x-position within the browser window's client area.

  Returns:
    the mouse x-position

### getClientY

    public int getClientY()

  Gets the mouse y-position within the browser window's client area.

  Returns:
    the mouse y-position

### getNativeButton

    public int getNativeButton()

  Gets the button value. Compare it to `NativeEvent.BUTTON_LEFT`, `NativeEvent.BUTTON_RIGHT`, `NativeEvent.BUTTON_MIDDLE`

  Returns:
    the button value

### getRelativeX

    public int getRelativeX(Element target)

  Gets the mouse x-position relative to a given element.

  Parameters:
    `target` - the element whose coordinate system is to be used
  Returns:
    the relative x-position

### getRelativeY

    public int getRelativeY(Element target)

  Gets the mouse y-position relative to a given element.

  Parameters:
    `target` - the element whose coordinate system is to be used
  Returns:
    the relative y-position

### getScreenX

    public int getScreenX()

  Gets the mouse x-position on the user's display.

  Returns:
    the mouse x-position

### getScreenY

    public int getScreenY()

  Gets the mouse y-position on the user's display.

  Returns:
    the mouse y-position

### getX

    public int getX()

  Gets the mouse x-position relative to the event's current target element.

  Returns:
    the relative x-position

### getY

    public int getY()

  Gets the mouse y-position relative to the event's current target element.

  Returns:
    the relative y-position

### isAltKeyDown

    public boolean isAltKeyDown()

  Is `alt` key down.

  Returns:
    whether the alt key is down

### isControlKeyDown

    public boolean isControlKeyDown()

  Is `control` key down.

  Returns:
    whether the control key is down

### isMetaKeyDown

    public boolean isMetaKeyDown()

  Is `meta` key down.

  Returns:
    whether the meta key is down

### isShiftKeyDown

    public boolean isShiftKeyDown()

  Is `shift` key down.

  Returns:
    whether the shift key is down

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