Package com.luciad.input
Class ClickEvent
java.lang.Object
com.luciad.input.ClickEvent
- All Implemented Interfaces:
IInputEvent
,AutoCloseable
- Direct Known Subclasses:
MouseClickEvent
,TouchTapEvent
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 Summary
ConstructorDescriptionClickEvent
(Coordinate location, long clickCount) Creates an event representing a click.ClickEvent
(Coordinate location, long clickCount, ModifierKeys modifierKeys) Creates an event representing a click. -
Method Summary
-
Constructor Details
-
ClickEvent
Creates an event representing a click.- Parameters:
location
- The location of the event, defined in device independent pixelsclickCount
- The number of clicks.
-
ClickEvent
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 pixelsclickCount
- The number of clicks.modifierKeys
- The modifiers of the event.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
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
public long getClickCount()Returns the amount of clicks.- Returns:
- the amount of clicks.
- See Also:
-
getModifierKeys
Returns the modifiers of the event.- Returns:
- the modifiers of the event.
-