Interface SupportsMouseEvents
- All Superinterfaces:
Evented
- All Known Implementing Classes:
Circle,CircleMarker,FeatureGroup,ImageOverlay,InteractiveLayer,LeafletMap,Marker,MarkerClusterGroup,MultiPolygon,MultiPolyline,Path,Polygon,Polyline,Rectangle
Mixin interface adding default methods to register listeners for mouse related Leaflet events on
the implementing component.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonClick(LeafletEventListener<MouseEvent> listener) Fired when the user clicks (or taps) the layer.default voidonContextMenuOpened(LeafletEventListener<MouseEvent> listener) Fired when the user right-clicks on the layer, prevents default browser context menu from showing if there are listeners on this event.default voidonDoubleClick(LeafletEventListener<MouseEvent> listener) Fired when the user double-clicks (or double-taps) the layer.default voidonMouseDown(LeafletEventListener<MouseEvent> listener) Fired when the user pushes the mouse button on the layer.default voidonMouseMove(LeafletEventListener<MouseEvent> listener) Fired while the mouse moves over the layeyr.default voidonMouseOut(LeafletEventListener<MouseEvent> listener) Fired when the mouse leaves the layer.default voidonMouseOver(LeafletEventListener<MouseEvent> listener) Fired when the mouse enters the layerdefault voidonMouseUp(LeafletEventListener<MouseEvent> listener) Fired when the user releases the mouse button pushed on the layer.Methods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.Evented
addEventListener, clearAllEventListeners, hasEventListeners, listens, off, off, on, removeEventListener
-
Method Details
-
onClick
Fired when the user clicks (or taps) the layer.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onDoubleClick
Fired when the user double-clicks (or double-taps) the layer.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMouseDown
Fired when the user pushes the mouse button on the layer.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMouseOver
Fired when the mouse enters the layer- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMouseUp
Fired when the user releases the mouse button pushed on the layer.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMouseOut
Fired when the mouse leaves the layer.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onMouseMove
Fired while the mouse moves over the layeyr.- Parameters:
listener- the listener to call when the event occurs, notnull
-
onContextMenuOpened
Fired when the user right-clicks on the layer, prevents default browser context menu from showing if there are listeners on this event. Also fired on mobile when the user holds a single touch for a second (also called long press).- Parameters:
listener- the listener to call when the event occurs, notnull
-