Top Description Fields Constructors Methods
org.eclipse.swt.events

public Class GestureEvent

extends TypedEvent
Class Inheritance
Imports
org.eclipse.swt.widgets.*

Instances of this class are sent in response to touch-based gestures that are triggered by the user.
Since
3.7
See Also
GestureListener, Sample code and further information

Field Summary

Modifier and TypeField and Description
public int
detail

The gesture type.

public boolean
doit

This flag indicates whether the operation should be allowed.

public double
magnification

This field is valid when the detail field is set to GESTURE_MAGNIFY.

public double
rotation

This field is valid when the detail field is set to GESTURE_ROTATE.

pack-priv static final long
public int
stateMask

The state of the keyboard modifier keys and mouse masks at the time the event was generated.

public int
x

The meaning of this field is dependent on the value of the detail field and the platform.

public int
xDirection

This field is valid when the detail field is set to GESTURE_SWIPE or GESTURE_PAN.

public int
y

The meaning of this field is dependent on the value of the detail field and the platform.

public int
yDirection

This field is valid when the detail field is set to GESTURE_SWIPE or GESTURE_PAN.

Inherited from org.eclipse.swt.events.TypedEvent:
datadisplaytimewidget

Constructor Summary

AccessConstructor and Description
public
GestureEvent(Event
the untyped event containing the information
e
)

Constructs a new instance of this class based on the information in the given untyped event.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a string representation of the event
toString
()

Overrides org.eclipse.swt.events.TypedEvent.toString.

Returns a string containing a concise, human-readable description of the receiver.
Inherited from org.eclipse.swt.events.TypedEvent:
getName

Field Detail

detailback to summary
public int detail

The gesture type.

This field determines the GestureEvent fields that contain valid data.
doitback to summary
public boolean doit

This flag indicates whether the operation should be allowed. Setting it to false will cancel the operation.

magnificationback to summary
public double magnification

This field is valid when the 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.

rotationback to summary
public double rotation

This field is valid when the 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.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.eclipse.swt.events.TypedEvent.serialVersionUID.

stateMaskback to summary
public int stateMask

The state of the keyboard modifier keys and mouse masks at the time the event was generated.

See Also
org.eclipse.swt.SWT#MODIFIER_MASK, org.eclipse.swt.SWT#BUTTON_MASK
xback to summary
public int x

The meaning of this field is dependent on the value of the 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.

xDirectionback to summary
public int xDirection

This field is valid when the 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 points and a negative value indicates a pan to the left by this field's count of points.

yback to summary
public int y

The meaning of this field is dependent on the value of the 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.

yDirectionback to summary
public int yDirection

This field is valid when the 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 points and a negative value indicates an upward pan by this field's count of points.

Constructor Detail

GestureEventback to summary
public GestureEvent(Event e)

Constructs a new instance of this class based on the information in the given untyped event.

Parameters
e:Event

the untyped event containing the information

Method Detail

toStringback to summary
public String toString()

Overrides org.eclipse.swt.events.TypedEvent.toString.

Returns a string containing a concise, human-readable description of the receiver.

Returns:String

a string representation of the event

Annotations
@Override