public final class PanEventHandler extends Object implements AutoCloseable
Constructor and Description |
---|
PanEventHandler()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
EventResult |
onDragEvent(DragEvent dragEvent,
Map map)
Moves the map's camera following the drag direction.
|
public void close()
close
in interface AutoCloseable
@NotNull public EventResult onDragEvent(@NotNull DragEvent dragEvent, @NotNull Map map) throws NullPointerException
The drag event is consumed only if the sequence of events is the following : a EventStatus#Start
event, 0 or more EventStatus#InProgress
event and finally a EventStatus#End
event. If the sequence is not correct, this method returns EventResult#NotConsumed
.
dragEvent
- a drag event. Cannot be null
.map
- the map. Cannot be null
.NullPointerException
- when passing null
for the map or the event.