public class

Touch

extends JavaScriptObject
java.lang.Object
   ↳ com.google.gwt.core.client.JavaScriptObject
     ↳ com.google.gwt.dom.client.Touch

Class Overview

Class representing touches. See Safari Touch Documentation

Summary

Protected Constructors
Touch()
Public Methods
final int getClientX()
Gets the touch x-position within the browser window's client area.
final int getClientY()
Gets the touch y-position within the browser window's client area.
final int getIdentifier()
Gets a unique identifier for this touch.
final int getPageX()
Gets the touch x-position within the browser document.
final int getPageY()
Gets the touch y-position within the browser document.
final int getRelativeX(Element target)
Gets the touch x-position relative to a given element.
final int getRelativeY(Element target)
Gets the touch y-position relative to a given element.
final int getScreenX()
Gets the touch x-position on the user's display.
final int getScreenY()
Gets the touch y-position on the user's display.
final EventTarget getTarget()
Gets the target element for the current touch.
[Expand]
Inherited Methods
From class com.google.gwt.core.client.JavaScriptObject
From class java.lang.Object

Protected Constructors

protected Touch ()

Public Methods

public final int getClientX ()

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

Returns
  • the touch x-position

public final int getClientY ()

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

Returns
  • the touch y-position

public final int getIdentifier ()

Gets a unique identifier for this touch.

Returns
  • the unique identifier for this touch

public final int getPageX ()

Gets the touch x-position within the browser document.

Returns
  • the touch x-position

public final int getPageY ()

Gets the touch y-position within the browser document.

Returns
  • the touch y-position

public final int getRelativeX (Element target)

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

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

public final int getRelativeY (Element target)

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

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

public final int getScreenX ()

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

Returns
  • the touch x-position

public final int getScreenY ()

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

Returns
  • the touch y-position

public final EventTarget getTarget ()

Gets the target element for the current touch.

Returns
  • the target element