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

## com.maryanovsky.gwtutils.client.ui.mouse.gestures.click
Class ClickEvent

    java.lang.Object
      com.google.gwt.event.shared.GwtEvent<H>
          com.maryanovsky.gwtutils.client.event.SyntheticEvent<H,E>
              com.maryanovsky.gwtutils.client.ui.mouse.gestures.SyntheticMouseGestureEvent<ClickHandler,MouseUpEvent>
                  com.maryanovsky.gwtutils.client.ui.mouse.gestures.click.ClickEvent

    public class ClickEvent

extends SyntheticMouseGestureEvent<ClickHandler,MouseUpEvent>

Represents a click event.

Author:
  Maryanovsky Alexander

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
`GwtEvent.Type<H>`

Constructor Summary
`ClickEvent(MouseUpEvent evt, int button, int clickCount, PointView clickLocation)` Creates a new `ClickEvent` from the specified source `MouseUpEvent`, mouse button, click count and location.

Method Summary
`protected void` | `dispatch(ClickHandler handler)` Dispatches the event to the handler.
`GwtEvent.Type<ClickHandler>` | `getAssociatedType()` Returns the event type associated with click events.
`int` | `getClickCount()` Returns the number of clicks that have occurred.
`PointView` | `getClickLocation()` Returns the location of the click(s), in the target element's coordinate system.
`int` | `getMouseButton()` Returns the button that was clicked.
`static GwtEvent.Type<ClickHandler>` | `getType()` Returns the event type associated with click events.

Methods inherited from class com.maryanovsky.gwtutils.client.event.SyntheticEvent
`getSourceEvent`

Methods inherited from class com.google.gwt.event.shared.GwtEvent
`assertLive, 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

### ClickEvent

    public ClickEvent(MouseUpEvent evt,
                      int button,
                      int clickCount,
                      PointView clickLocation)

  Creates a new `ClickEvent` from the specified source `MouseUpEvent`, mouse button, click count and location.

  Parameters:
    `evt` - The mouse up event that triggered this event.
    `button` - The clicked mouse button.
    `clickCount` - The number of clicks that have occurred.
    `clickLocation` - The location of the click(s), in the target element's coordinate system.

Method Detail

### getMouseButton

    public int getMouseButton()

  Returns the button that was clicked. Possible values are `NativeEvent.BUTTON_LEFT`, `NativeEvent.BUTTON_MIDDLE` and `NativeEvent.BUTTON_RIGHT`.

### getClickCount

    public int getClickCount()

  Returns the number of clicks that have occurred.

### getClickLocation

    public PointView getClickLocation()

  Returns the location of the click(s), in the target element's coordinate system.

### getType

    public static GwtEvent.Type<ClickHandler> getType()

  Returns the event type associated with click events.

### getAssociatedType

    public GwtEvent.Type<ClickHandler> getAssociatedType()

  Returns the event type associated with click events.

  Specified by:
    `getAssociatedType` in class `GwtEvent<ClickHandler>`

### dispatch

    protected void dispatch(ClickHandler handler)

  Dispatches the event to the handler.

  Specified by:
    `dispatch` in class `GwtEvent<ClickHandler>`

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