Class InteractiveLayer
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.LeafletObject
org.vaadin.addons.componentfactory.leaflet.layer.Layer
org.vaadin.addons.componentfactory.leaflet.layer.InteractiveLayer
- All Implemented Interfaces:
Serializable,Evented,SupportsMouseEvents,Identifiable,LayerPopupFunctions,LayerTooltipFunctions,ExecutableFunctions
- Direct Known Subclasses:
ImageOverlay,Marker,Path
Some Layers can be made interactive - when the user interacts with such a
layer, mouse events like click and mouseover can be handled. Use the event
handling methods to handle these events.
- Since:
- 2020-02-06
- Version:
- 1.0
- Author:
- Gabor Kokeny Email: kokeny19@gmail.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
Layer.LayerEventType -
Field Summary
Fields inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
DEFAULT_PANE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new interactive layer that is interactive and bubbles mouse events by default. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether mouse events on this layer bubble up to its parents.booleanReturns whether this layer emits mouse events and reacts to user interaction.voidsetBubblingMouseEvents(boolean bubblingMouseEvents) Sets whether mouse events on this layer bubble up to its parents.voidsetInteractive(boolean interactive) Sets whether this layer emits mouse events and reacts to user interaction.Methods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
addEventListener, addTo, addTo, bindPopup, bindPopup, bindTooltip, bindTooltip, clearAllEventListeners, fireEvent, getAttribution, getEvents, getPane, getPopup, getTooltip, hasEventListeners, onAdd, onPopupClose, onPopupOpen, onRemove, onTooltipClose, onTooltipOpen, remove, removeEventListener, set, setAttribution, setPane, unbindPopup, unbindTooltipMethods inherited from class org.vaadin.addons.componentfactory.leaflet.LeafletObject
call, configureObjectMapper, executeJs, getConstructorArgumentNames, getJson, getLeafletType, getParent, getUuid, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.Evented
addEventListener, clearAllEventListeners, hasEventListeners, listens, off, off, on, removeEventListenerMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.map.functions.ExecutableFunctions
call, call, executeJs, executeJsMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.Identifiable
getUuidMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.LayerPopupFunctions
closePopup, isPopupOpen, openPopup, openPopup, setPopupContent, setPopupContent, togglePopupMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.LayerTooltipFunctions
closeTooltip, isTooltipOpen, openTooltip, openTooltip, setTooltipContent, setTooltipContent, toggleTooltipMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.supports.SupportsMouseEvents
onClick, onContextMenuOpened, onDoubleClick, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp
-
Constructor Details
-
InteractiveLayer
protected InteractiveLayer()Creates a new interactive layer that is interactive and bubbles mouse events by default.
-
-
Method Details
-
isInteractive
public boolean isInteractive()Returns whether this layer emits mouse events and reacts to user interaction.- Returns:
trueif the layer is interactive
-
setInteractive
public void setInteractive(boolean interactive) Sets whether this layer emits mouse events and reacts to user interaction.- Parameters:
interactive-trueto make the layer interactive
-
isBubblingMouseEvents
public boolean isBubblingMouseEvents()Returns whether mouse events on this layer bubble up to its parents.- Returns:
trueif mouse events bubble up
-
setBubblingMouseEvents
public void setBubblingMouseEvents(boolean bubblingMouseEvents) Sets whether mouse events on this layer bubble up to its parents.- Parameters:
bubblingMouseEvents-trueto let mouse events bubble up
-