public class GestureEvent extends TypedEvent
GestureListener,
Sample code and further information,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
int |
detail
The gesture type.
|
boolean |
doit
This flag indicates whether the operation should be allowed.
|
double |
magnification
This field is valid when the
detail field is set to GESTURE_MAGNIFY. |
double |
rotation
This field is valid when the
detail field is set to GESTURE_ROTATE. |
(package private) static long |
serialVersionUID |
int |
stateMask
The state of the keyboard modifier keys and mouse masks
at the time the event was generated.
|
int |
x
The meaning of this field is dependent on the value of the
detail field
and the platform. |
int |
xDirection
This field is valid when the
detail field is set to GESTURE_SWIPE
or GESTURE_PAN. |
int |
y
The meaning of this field is dependent on the value of the
detail field
and the platform. |
int |
yDirection
This field is valid when the
detail field is set to GESTURE_SWIPE
or GESTURE_PAN. |
data, display, time, widget| Constructor and Description |
|---|
GestureEvent(Event e)
Constructs a new instance of this class based on the
information in the given untyped event.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString()
Returns a string containing a concise, human-readable
description of the receiver.
|
getNamepublic int stateMask
SWT.MODIFIER_MASK,
SWT.BUTTON_MASKpublic int detail
SWT.GESTURE_BEGINSWT.GESTURE_ENDSWT.GESTURE_MAGNIFYSWT.GESTURE_PANSWT.GESTURE_ROTATESWT.GESTURE_SWIPEGestureEvent fields that contain valid data.public int x
detail field
and the platform. It can represent either the x coordinate of the centroid of the
touches that make up the gesture, or the x coordinate of the cursor at the time the
gesture was performed.public int y
detail field
and the platform. It can represent either the y coordinate of the centroid of the
touches that make up the gesture, or the y coordinate of the cursor at the time the
gesture was performed.public double rotation
detail field is set to GESTURE_ROTATE.
It specifies the number of degrees rotated on the device since the gesture started. Positive
values indicate counter-clockwise rotation, and negative values indicate clockwise rotation.public int xDirection
detail field is set to GESTURE_SWIPE
or GESTURE_PAN. Both xDirection and yDirection
can be valid for an individual gesture. The meaning of this field is dependent on the value
of the detail field.
If detail is GESTURE_SWIPE then a positive value indicates a swipe
to the right and a negative value indicates a swipe to the left.
If detail is GESTURE_PAN then a positive value indicates a pan to
the right by this field's count of pixels and a negative value indicates a pan to the left
by this field's count of pixels.
public int yDirection
detail field is set to GESTURE_SWIPE
or GESTURE_PAN. Both xDirection and yDirection
can be valid for an individual gesture. The meaning of this field is dependent on the value
of the detail field.
If detail is GESTURE_SWIPE then a positive value indicates a downward
swipe and a negative value indicates an upward swipe.
If detail is GESTURE_PAN then a positive value indicates a downward
pan by this field's count of pixels and a negative value indicates an upward pan by this
field's count of pixels.public double magnification
detail field is set to GESTURE_MAGNIFY.
This is the scale factor to be applied. This value will be 1.0 in the first received event with
GESTURE_MAGNIFY, and will then fluctuate in subsequent events as the user moves
their fingers.public boolean doit
false will cancel the operation.static final long serialVersionUID
public GestureEvent(Event e)
e - the untyped event containing the informationpublic java.lang.String toString()
toString in class TypedEvent