Class TouchDragEvent

java.lang.Object
com.luciad.input.DragEvent
com.luciad.input.touch.TouchDragEvent
All Implemented Interfaces:
IInputEvent, AutoCloseable

public final class TouchDragEvent extends DragEvent implements 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 Details Link icon

    • TouchDragEvent Link icon

      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 Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class DragEvent
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class DragEvent
    • getInitialCenterLocation Link icon

      @NotNull public Coordinate 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 Link icon

      @NotNull public Coordinate 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 Link icon

      public long getTouchPointCount()
      Returns the amount of touch points that are used.
      Returns:
      the amount of touch points that are used.