Package com.vaadin.client.event
Class PointerEvent<H extends com.google.gwt.event.shared.EventHandler>
- java.lang.Object
-
- com.google.web.bindery.event.shared.Event<H>
-
- com.google.gwt.event.shared.GwtEvent<H>
-
- com.google.gwt.event.dom.client.DomEvent<H>
-
- com.google.gwt.event.dom.client.HumanInputEvent<H>
-
- com.google.gwt.event.dom.client.MouseEvent<H>
-
- com.vaadin.client.event.PointerEvent<H>
-
- Type Parameters:
H
- handler type
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasNativeEvent
- Direct Known Subclasses:
PointerCancelEvent
,PointerDownEvent
,PointerMoveEvent
,PointerUpEvent
public abstract class PointerEvent<H extends com.google.gwt.event.shared.EventHandler> extends com.google.gwt.event.dom.client.MouseEvent<H>
Abstract class representing Pointer events.- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE_MOUSE
static String
TYPE_PEN
static String
TYPE_TOUCH
static String
TYPE_UNKNOWN
-
Constructor Summary
Constructors Constructor Description PointerEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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 com.google.gwt.event.dom.client.MouseEvent
getClientX, getClientY, getNativeButton, getRelativeX, getRelativeY, getScreenX, getScreenY, getX, getY
-
Methods inherited from class com.google.gwt.event.dom.client.HumanInputEvent
isAltKeyDown, isControlKeyDown, isMetaKeyDown, isShiftKeyDown
-
Methods inherited from class com.google.gwt.event.dom.client.DomEvent
fireNativeEvent, fireNativeEvent, getAssociatedType, getNativeEvent, getRelativeElement, preventDefault, setNativeEvent, setRelativeElement, stopPropagation
-
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, dispatch, getSource, isLive, kill, revive
-
-
-
-
Field Detail
-
TYPE_UNKNOWN
public static final String TYPE_UNKNOWN
- See Also:
- Constant Field Values
-
TYPE_TOUCH
public static final String TYPE_TOUCH
- See Also:
- Constant Field Values
-
TYPE_PEN
public static final String TYPE_PEN
- See Also:
- Constant Field Values
-
TYPE_MOUSE
public static final String TYPE_MOUSE
- See Also:
- Constant Field Values
-
-
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 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
-
-