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
Class MouseGestureRecognizer

    java.lang.Object
      com.maryanovsky.gwtutils.client.ui.mouse.gestures.MouseGestureRecognizer

Direct Known Subclasses:
  ClickRecognizer, DragRecognizer, WheelScrollRecognizer

    public abstract class MouseGestureRecognizer

extends Object

The base class for all mouse gesture recognizers.

Author:
  Maryanovsky Alexander

Field Summary
`protected HandlerManager` | `handlerManager` The manager of handlers.

Constructor Summary
`MouseGestureRecognizer(Object firedEventsSource)` Creates a new `MouseGestureRecognizer` which will dispatch events with the specified source object.
`MouseGestureRecognizer(Object firedEventsSource, H mouseEventsSource)` Creates a new `MouseGestureRecognizer` which will dispatch events with the specified source object.

Method Summary
`protected void` | `fireEvent(GwtEvent<?> event)` Fires the specified event to all its handlers.
`protected void` | `onMouseDown(MouseDownEvent event)` Invoked when a mouse button is pressed.
`protected void` | `onMouseMove(MouseMoveEvent event)` Invoked when the mouse is moved.
`protected void` | `onMouseOut(MouseOutEvent event)` Invoked when the mouse cursor leaves the element.
`protected void` | `onMouseOver(MouseOverEvent event)` Invoked when the mouse cursor enters an element.
`protected void` | `onMouseUp(MouseUpEvent event)` Invoked when a mouse button is released.
`protected void` | `onMouseWheel(MouseWheelEvent event)` Invoked when the mouse wheel is scrolled.
`
`<H extends HasMouseDownHandlers & HasMouseUpHandlers & HasMouseMoveHandlers & HasMouseOutHandlers & HasMouseOverHandlers & HasMouseWheelHandlers> void`
` | `setMouseEventsSource(H mouseEventsSource)` Sets the source of mouse events for this recognizer.

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

Field Detail

### handlerManager

    protected final HandlerManager handlerManager

  The manager of handlers.

Constructor Detail

### MouseGestureRecognizer

    public MouseGestureRecognizer(Object firedEventsSource)

  Creates a new `MouseGestureRecognizer` which will dispatch events with the specified source object.

### MouseGestureRecognizer

    public MouseGestureRecognizer(Object firedEventsSource,
                                  H mouseEventsSource)

  Creates a new `MouseGestureRecognizer` which will dispatch events with the specified source object. Additionally, you may pass the source of mouse events.

Method Detail

### setMouseEventsSource

    public <H extends HasMouseDownHandlers & HasMouseUpHandlers & HasMouseMoveHandlers & HasMouseOutHandlers & HasMouseOverHandlers & HasMouseWheelHandlers> void setMouseEventsSource(H mouseEventsSource)

  Sets the source of mouse events for this recognizer. Passing `null` will cause the recognizer to deregister itself from the previous source.

### fireEvent

    protected void fireEvent(GwtEvent<?> event)

  Fires the specified event to all its handlers.

### onMouseDown

    protected void onMouseDown(MouseDownEvent event)

  Invoked when a mouse button is pressed.

### onMouseUp

    protected void onMouseUp(MouseUpEvent event)

  Invoked when a mouse button is released.

### onMouseMove

    protected void onMouseMove(MouseMoveEvent event)

  Invoked when the mouse is moved.

### onMouseOut

    protected void onMouseOut(MouseOutEvent event)

  Invoked when the mouse cursor leaves the element.

### onMouseOver

    protected void onMouseOver(MouseOverEvent event)

  Invoked when the mouse cursor enters an element.

### onMouseWheel

    protected void onMouseWheel(MouseWheelEvent event)

  Invoked when the mouse wheel is scrolled.

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