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.iphone.ui.touch.gestures.mouse
Class TouchMouseEventsConverter

    java.lang.Object
      com.maryanovsky.gwtutils.client.iphone.ui.touch.gestures.TouchGestureRecognizer
          com.maryanovsky.gwtutils.client.iphone.ui.touch.gestures.mouse.TouchMouseEventsConverter

All Implemented Interfaces:
  HasAllMouseHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasHandlers

    public class TouchMouseEventsConverter

extends TouchGestureRecognizer
implements HasAllMouseHandlers

Generates synthetic mouse events from corresponding touch events. This is useful for widget implementers that want to add basic iPhone support without modifying their widget's API. The converter can be used in two ways:

- As a direct source of mouse events, by registering mouse handlers with it.
- As an indirect source of mouse events, by specifying a non-null target widget, which will cause the converter to dispatch synthetic mouse events on that widget.

Author:
  Maryanovsky Alexander

Field Summary

Fields inherited from class com.maryanovsky.gwtutils.client.iphone.ui.touch.gestures.TouchGestureRecognizer
`handlerManager`

Constructor Summary
`TouchMouseEventsConverter(UIObject target)` Creates a new `TouchMouseEventsConverter` with the specified target widget.
`TouchMouseEventsConverter(UIObject target, H touchEventsSource)` Creates a new `TouchMouseEventsConverter` with the specified target widget.

Method Summary
`HandlerRegistration` | `addMouseDownHandler(MouseDownHandler handler)`
`HandlerRegistration` | `addMouseMoveHandler(MouseMoveHandler handler)`
`HandlerRegistration` | `addMouseOutHandler(MouseOutHandler handler)`
`HandlerRegistration` | `addMouseOverHandler(MouseOverHandler handler)`
`HandlerRegistration` | `addMouseUpHandler(MouseUpHandler handler)`
`HandlerRegistration` | `addMouseWheelHandler(MouseWheelHandler handler)`
`void` | `fireEvent(GwtEvent<?> event)` Fires the specified event to all its handlers.
`protected void` | `onTouchCancel(TouchCancelEvent evt)` Invoked when a touch is cancelled.
`protected void` | `onTouchEnd(TouchEndEvent evt)` Invoked when a finger touching the screen is lifted.
`protected void` | `onTouchMove(TouchMoveEvent evt)` Invoked when a finger touching the screen is moved.
`protected void` | `onTouchStart(TouchStartEvent evt)` Invoked when a touch starts.

Methods inherited from class com.maryanovsky.gwtutils.client.iphone.ui.touch.gestures.TouchGestureRecognizer
`setTouchEventsSource`

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

Constructor Detail

### TouchMouseEventsConverter

    public TouchMouseEventsConverter(UIObject target)

  Creates a new `TouchMouseEventsConverter` with the specified target widget. If the target widget is not `null`, synthetic mouse events will be dispatched on it, and its element will be used as the element relative to which event coordinates are measured.

### TouchMouseEventsConverter

    public TouchMouseEventsConverter(UIObject target,
                                     H touchEventsSource)

  Creates a new `TouchMouseEventsConverter` with the specified target widget. If the target widget is not `null`, synthetic mouse events will be dispatched on it, and its element will be used as the element relative to which event coordinates are measured. Additionally, you may pass the source of touch events.

Method Detail

### addMouseDownHandler

    public HandlerRegistration addMouseDownHandler(MouseDownHandler handler)

  Specified by:
    `addMouseDownHandler` in interface `HasMouseDownHandlers`

### addMouseMoveHandler

    public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler)

  Specified by:
    `addMouseMoveHandler` in interface `HasMouseMoveHandlers`

### addMouseUpHandler

    public HandlerRegistration addMouseUpHandler(MouseUpHandler handler)

  Specified by:
    `addMouseUpHandler` in interface `HasMouseUpHandlers`

### addMouseOverHandler

    public HandlerRegistration addMouseOverHandler(MouseOverHandler handler)

  Specified by:
    `addMouseOverHandler` in interface `HasMouseOverHandlers`

### addMouseOutHandler

    public HandlerRegistration addMouseOutHandler(MouseOutHandler handler)

  Specified by:
    `addMouseOutHandler` in interface `HasMouseOutHandlers`

### addMouseWheelHandler

    public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler)

  Specified by:
    `addMouseWheelHandler` in interface `HasMouseWheelHandlers`

### fireEvent

    public void fireEvent(GwtEvent<?> event)

  Fires the specified event to all its handlers.

  Specified by:
    `fireEvent` in interface `HasHandlers`
  Overrides:
    `fireEvent` in class `TouchGestureRecognizer`

### onTouchStart

    protected void onTouchStart(TouchStartEvent evt)

  Invoked when a touch starts.

  Overrides:
    `onTouchStart` in class `TouchGestureRecognizer`

### onTouchMove

    protected void onTouchMove(TouchMoveEvent evt)

  Invoked when a finger touching the screen is moved.

  Overrides:
    `onTouchMove` in class `TouchGestureRecognizer`

### onTouchEnd

    protected void onTouchEnd(TouchEndEvent evt)

  Invoked when a finger touching the screen is lifted.

  Overrides:
    `onTouchEnd` in class `TouchGestureRecognizer`

### onTouchCancel

    protected void onTouchCancel(TouchCancelEvent evt)

  Invoked when a touch is cancelled.

  Overrides:
    `onTouchCancel` in class `TouchGestureRecognizer`

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