Class TouchDownEvent

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

public final class TouchDownEvent extends Object implements IInputEvent, AutoCloseable
Implementation of IInputEvent that represents a pointer (typically a finger) being pressed on a touch surface.

This class contains the location of the touch point and an identifier assigned to it for as long as the touch point remains pressed.

  • Constructor Details Link icon

    • TouchDownEvent Link icon

      public TouchDownEvent(@NotNull Coordinate location, long id)
      Creates an event representing a point being pressed on a touch surface.
      Parameters:
      location - The touch point location, defined in device independent pixels
      id - The touch point identifier
  • Method Details Link icon

    • finalize Link icon

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

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getLocation Link icon

      @NotNull public Coordinate getLocation()
      Returns the location of the event.

      It is expressed in device independent pixel coordinates with top-left corner of the map being the (0,0) position.

      Returns:
      the location of the event.
    • getId Link icon

      public long getId()
      Returns the touch point identifier, such as an index used per finger for example.
      Returns:
      the touch point identifier.