Class ClickEvent

java.lang.Object
com.luciad.input.ClickEvent
All Implemented Interfaces:
IInputEvent, AutoCloseable
Direct Known Subclasses:
MouseClickEvent, TouchTapEvent

public class ClickEvent extends Object implements IInputEvent, AutoCloseable
Implementation of IInputEvent that represents a click event.

This class contains the location and the click count. The click count is reset if the interval between two clicks exceeds MouseGestureRecognizer#getMultiClickInterval.

  • Constructor Details Link icon

    • ClickEvent Link icon

      public ClickEvent(@NotNull Coordinate location, long clickCount)
      Creates an event representing a click.
      Parameters:
      location - The location of the event, defined in device independent pixels
      clickCount - The number of clicks.
    • ClickEvent Link icon

      public ClickEvent(@NotNull Coordinate location, long clickCount, @NotNull ModifierKeys modifierKeys)
      Creates an event representing a click.
      Parameters:
      location - The location of the event, defined in device independent pixels
      clickCount - The number of clicks.
      modifierKeys - The modifiers of the event.
  • 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.

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

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

      public long getClickCount()
      Returns the amount of clicks.
      Returns:
      the amount of clicks.
      See Also:
    • getModifierKeys Link icon

      @NotNull public ModifierKeys getModifierKeys()
      Returns the modifiers of the event.
      Returns:
      the modifiers of the event.