Class DragEvent

java.lang.Object
com.luciad.input.DragEvent
All Implemented Interfaces:
IInputEvent, AutoCloseable
Direct Known Subclasses:
MouseDragEvent, TouchDragEvent

public class DragEvent extends Object implements IInputEvent, AutoCloseable
Implementation of IInputEvent that represents a drag gesture.

This class contains the current mouse location, the start location and the status of the drag gesture.

  • Constructor Details Link icon

    • DragEvent Link icon

      public DragEvent(@NotNull Coordinate location, @NotNull EventStatus status, @NotNull Coordinate startLocation)
      Creates a drag event.
      Parameters:
      location - The current event location, defined in device independent pixels.
      status - The event status.
      startLocation - The location of the first event for this gesture.
  • 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 position of the event.

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

      Returns:
      the position of the event.
    • getStatus Link icon

      @NotNull public EventStatus getStatus()
      Returns the status of the event.
      Returns:
      the status of the event.
    • getStartLocation Link icon

      @NotNull public Coordinate getStartLocation()
      Returns the initial location of the entire drag gesture.

      The location is defined in screen coordinates with top-left corner of the map being the (0,0) position.

      Returns:
      the initial location of the entire drag gesture.
    • getModifierKeys Link icon

      @NotNull public ModifierKeys getModifierKeys()
      Returns the modifier keys.
      Returns:
      the modifier keys.