Package com.luciad.input.touch
Class TouchDragEvent
java.lang.Object
com.luciad.input.DragEvent
com.luciad.input.touch.TouchDragEvent
- All Implemented Interfaces:
IInputEvent
,AutoCloseable
Implementation of
IInputEvent
that represents a touch drag gesture.
It contains the initial and the current centroid location of the touch points in addition to the number of touch points currently detected and the current status of the gesture.
-
Constructor Summary
ConstructorDescriptionTouchDragEvent
(Coordinate initialCenterLocation, Coordinate currentCenterLocation, long touchPointCount, EventStatus status) Create a touch drag event. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
Returns the location of the centroid of the surface represented by the current locations of the pointers.Returns the location of the centroid of the surface represented by the initial locations of the pointers.long
Returns the amount of touch points that are used.Methods inherited from class com.luciad.input.DragEvent
getLocation, getModifierKeys, getStartLocation, getStatus
-
Constructor Details
-
TouchDragEvent
public TouchDragEvent(@NotNull Coordinate initialCenterLocation, @NotNull Coordinate currentCenterLocation, long touchPointCount, @NotNull EventStatus status) Create a touch drag event.- Parameters:
initialCenterLocation
- The center location at the beginning of the gesture, defined in device independent pixels.currentCenterLocation
- The current center location, defined in device independent pixels.touchPointCount
- How many touch points are used in the gesture.status
- The status of the gesture.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classDragEvent
-
getInitialCenterLocation
Returns the location of the centroid of the surface represented by the initial locations of the pointers.This location is defined in device independent pixels.
- Returns:
- the location of the centroid of the surface represented by the initial locations of the pointers.
-
getCurrentCenterLocation
Returns the location of the centroid of the surface represented by the current locations of the pointers.This location is defined in device independent pixels.
- Returns:
- the location of the centroid of the surface represented by the current locations of the pointers.
-
getTouchPointCount
public long getTouchPointCount()Returns the amount of touch points that are used.- Returns:
- the amount of touch points that are used.
-