Class BaseMoveEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<LeafletMap>
org.vaadin.addons.componentfactory.leaflet.layer.events.LeafletEvent
org.vaadin.addons.componentfactory.leaflet.layer.events.BaseMoveEvent
- All Implemented Interfaces:
Serializable
Base class for events that report a change of coordinates, carrying both the previous and the
new position of a layer.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionBaseMoveEvent(LeafletMap source, boolean fromClient, String layerId, DragEventType eventType, LatLng oldLatLng, LatLng latLng) Creates a new move event. -
Method Summary
Methods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.events.LeafletEvent
getLayerId, getTypeMethods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListener
-
Constructor Details
-
BaseMoveEvent
public BaseMoveEvent(LeafletMap source, boolean fromClient, String layerId, DragEventType eventType, LatLng oldLatLng, LatLng latLng) Creates a new move event.- Parameters:
source- the component that fired the eventfromClient-trueif the event originated from the client sidelayerId- the identifier of the layer that movedeventType- the specific drag event typeoldLatLng- the coordinates before the movelatLng- the coordinates after the move
-
-
Method Details
-
getLatLng
Gets the coordinates the layer moved to.- Returns:
- the new coordinates
-
getOldLatLng
Gets the coordinates the layer moved from.- Returns:
- the old coordinates
-
toString
- Overrides:
toStringin classLeafletEvent
-