Eclipse Rich Ajax Platform
Release 1.3

org.eclipse.swt.events
Class GestureEvent

java.lang.Object
  extended byEvent
      extended byorg.eclipse.swt.events.TypedEvent
          extended byorg.eclipse.swt.events.GestureEvent

public class GestureEvent
extends TypedEvent

Instances of this class are sent as a result of a touch-based gesture being generated by the user.

Since:
1.4
See Also:
GestureListener, Serialized Form

Field Summary
 int detail
          The gesture type.
 boolean doit
          A flag indicating whether the operation should be allowed.
 double magnification
          Scale factor to be applied.
 double rotation
          Number of degrees rotated on the device since the gesture started.
 int stateMask
          the state of the keyboard modifier keys and mouse masks at the time the event was generated.
 int x
          Depending on the value of the detail field and the current platform, this field can mean the x coordinate of the centroid of the touches that make up the gesture (Windows), or the x coordinate of the screen location of the cursor at the time the gesture was performed (Mac OS X).
 int xDirection
          The meaning of this field depends on the value of the detail field.
 int y
          Depending on the value of the detail field and the current platform, this field can mean the y coordinate of the centroid of the touches that make up the gesture (Windows), or the y component of the screen location of the cursor at the time the gesture was performed (Mac OS X).
 int yDirection
          The meaning of this field depends on the value of the detail field.
 
Fields inherited from class org.eclipse.swt.events.TypedEvent
data, display, widget
 
Constructor Summary
GestureEvent(Event e)
          Constructs a new instance of this class based on the information in the given untyped event.
 
Method Summary
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class org.eclipse.swt.events.TypedEvent
allowProcessing, dispatchToObserver, executeNext, getListenerType, getSource, processEvent, processScheduledEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stateMask

public int stateMask
the state of the keyboard modifier keys and mouse masks at the time the event was generated.

See Also:
SWT.MODIFIER_MASK, SWT.BUTTON_MASK

detail

public int detail
The gesture type.

The value of the detail field determines which fields of the GestureEvent contain valid data.


x

public int x
Depending on the value of the detail field and the current platform, this field can mean the x coordinate of the centroid of the touches that make up the gesture (Windows), or the x coordinate of the screen location of the cursor at the time the gesture was performed (Mac OS X).


y

public int y
Depending on the value of the detail field and the current platform, this field can mean the y coordinate of the centroid of the touches that make up the gesture (Windows), or the y component of the screen location of the cursor at the time the gesture was performed (Mac OS X).


rotation

public double rotation
Number of degrees rotated on the device since the gesture started. Positive values indicated counter-clockwise rotation; negative values indicate clockwise rotation. This field is valid when the detail field is set to GESTURE_ROTATE.


xDirection

public int xDirection
The meaning of this field depends on the value of the detail field. If detail is GESTURE_SWIPE and non-zero, a positive value indicates a swipe to the right, and a negative value indicates a swipe to the left. If detail is GESTURE_PAN a positive value indicates a pan to the right of that many pixels, and a negative value indicates a pan to the left of that many pixels. This field is valid when the detail field is set to GESTURE_SWIPE or GESTURE_PAN. Both the xDirection and yDirection can be valid for an individual gesture.


yDirection

public int yDirection
The meaning of this field depends on the value of the detail field. If detail is GESTURE_SWIPE and non-zero, a positive value indicates a swipe down, and a negative value indicates a swipe up. If detail is GESTURE_PAN a positive value indicates a pan downwards of that many pixels, and a negative value indicates a pan upwards of that many pixels. This field is valid when the detail field is set to GESTURE_SWIPE or GESTURE_PAN. Both the xDirection and yDirection can be valid for an individual gesture.


magnification

public double magnification
Scale factor to be applied. In the first GESTURE_MAGNIFY received for a magnification this value will be 1.0 and will then fluctuate as the user moves their fingers. This field is valid when the detail field is set to GESTURE_MAGNIFY.


doit

public boolean doit
A flag indicating whether the operation should be allowed. Setting this field to false will cancel the operation.

Constructor Detail

GestureEvent

public GestureEvent(Event e)
Constructs a new instance of this class based on the information in the given untyped event.

Parameters:
e - the untyped event containing the information
Method Detail

toString

public String toString()
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class TypedEvent
Returns:
a string representation of the event

Eclipse Rich Ajax Platform
Release 1.3

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.