GWT 2.7.0

com.google.gwt.dom.client
Class Touch

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.dom.client.Touch

public class Touch
extends JavaScriptObject

Class representing touches. See Safari Touch Documentation


Constructor Summary
protected Touch()
           
 
Method Summary
 int getClientX()
          Gets the touch x-position within the browser window's client area.
 int getClientY()
          Gets the touch y-position within the browser window's client area.
 int getIdentifier()
          Gets a unique identifier for this touch.
 int getPageX()
          Gets the touch x-position within the browser document.
 int getPageY()
          Gets the touch y-position within the browser document.
 int getRelativeX(Element target)
          Gets the touch x-position relative to a given element.
 int getRelativeY(Element target)
          Gets the touch y-position relative to a given element.
 int getScreenX()
          Gets the touch x-position on the user's display.
 int getScreenY()
          Gets the touch y-position on the user's display.
 EventTarget getTarget()
          Gets the target element for the current touch.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Touch

protected Touch()
Method Detail

getClientX

public final int getClientX()
Gets the touch x-position within the browser window's client area.

Returns:
the touch x-position

getClientY

public final int getClientY()
Gets the touch y-position within the browser window's client area.

Returns:
the touch y-position

getIdentifier

public final int getIdentifier()
Gets a unique identifier for this touch.

Returns:
the unique identifier for this touch

getPageX

public final int getPageX()
Gets the touch x-position within the browser document.

Returns:
the touch x-position

getPageY

public final int getPageY()
Gets the touch y-position within the browser document.

Returns:
the touch y-position

getRelativeX

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

getRelativeY

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

getScreenX

public final int getScreenX()
Gets the touch x-position on the user's display.

Returns:
the touch x-position

getScreenY

public final int getScreenY()
Gets the touch y-position on the user's display.

Returns:
the touch y-position

getTarget

public final EventTarget getTarget()
Gets the target element for the current touch.

Returns:
the target element

GWT 2.7.0