com.vaadin.client.event
Class PointerEvent<H extends com.google.gwt.event.shared.EventHandler>

java.lang.Object
  extended by 
      extended by com.vaadin.client.event.PointerEvent<H>
Type Parameters:
H - handler type
Direct Known Subclasses:
PointerCancelEvent, PointerDownEvent, PointerMoveEvent, PointerUpEvent

public abstract class PointerEvent<H extends com.google.gwt.event.shared.EventHandler>
extends

Abstract class representing Pointer events.

Since:
7.2

Field Summary
static java.lang.String TYPE_MOUSE
           
static java.lang.String TYPE_PEN
           
static java.lang.String TYPE_TOUCH
           
static java.lang.String TYPE_UNKNOWN
           
 
Constructor Summary
PointerEvent()
           
 
Method Summary
 int getHeight()
          Gets the height of the contact geometry of the pointer in CSS pixels.
 int getPointerId()
          Gets a unique identifier for the pointer that caused this event.
 java.lang.String getPointerType()
          Gets the type of the pointer device that caused this event.
 double getPressure()
          Gets the pressure of the pointer input as a value in the range of [0, 1] where 0 and 1 represent the minimum and maximum, respectively.
 double getTiltX()
          Gets the angle between the Y-Z plane and the plane containing both the transducer and the Y axis.
 double getTiltY()
          Gets the angle between the X-Z plane and the plane containing both the transducer and the X axis.
 int getWidth()
          Gets the width of the contact geometry of the pointer in CSS pixels.
 boolean isPrimary()
          Indicates whether the pointer is the primary pointer of this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_UNKNOWN

public static final java.lang.String TYPE_UNKNOWN
See Also:
Constant Field Values

TYPE_TOUCH

public static final java.lang.String TYPE_TOUCH
See Also:
Constant Field Values

TYPE_PEN

public static final java.lang.String TYPE_PEN
See Also:
Constant Field Values

TYPE_MOUSE

public static final java.lang.String TYPE_MOUSE
See Also:
Constant Field Values
Constructor Detail

PointerEvent

public PointerEvent()
Method Detail

getPointerId

public final int getPointerId()
Gets a unique identifier for the pointer that caused this event. The identifiers of previously active but retired pointers may be recycled.

Returns:
unique pointer id

getWidth

public final int getWidth()
Gets the width of the contact geometry of the pointer in CSS pixels.

Returns:
width in CSS pixels

getHeight

public final int getHeight()
Gets the height of the contact geometry of the pointer in CSS pixels.

Returns:
height in CSS pixels.

getPressure

public final double getPressure()
Gets the pressure of the pointer input as a value in the range of [0, 1] where 0 and 1 represent the minimum and maximum, respectively.

Returns:
input pressure as a value between 0 and 1

getTiltX

public final double getTiltX()
Gets the angle between the Y-Z plane and the plane containing both the transducer and the Y axis. A positive tilt is to the right.

Returns:
the tilt along the X axis as degrees in the range of [-90, 90], or 0 if the device does not support tilt

getTiltY

public final double getTiltY()
Gets the angle between the X-Z plane and the plane containing both the transducer and the X axis. A positive tilt is towards the user.

Returns:
the tilt along the Y axis as degrees in the range of [-90, 90], or 0 if the device does not support tilt

getPointerType

public final java.lang.String getPointerType()
Gets the type of the pointer device that caused this event.

Returns:
a String indicating the type of the pointer device
See Also:
TYPE_UNKNOWN, TYPE_TOUCH, TYPE_PEN, TYPE_MOUSE

isPrimary

public final boolean isPrimary()
Indicates whether the pointer is the primary pointer of this type.

Returns:
true if the pointer is the primary pointer, otherwise false


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.