Class Tooltip
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.LeafletObject
org.vaadin.addons.componentfactory.leaflet.layer.Layer
org.vaadin.addons.componentfactory.leaflet.layer.ui.DivOverlay
org.vaadin.addons.componentfactory.leaflet.layer.ui.tooltip.Tooltip
- All Implemented Interfaces:
Serializable,Evented,Identifiable,LayerPopupFunctions,LayerTooltipFunctions,ExecutableFunctions
Used to display small texts on top of map layers. Extends
DivOverlay.- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the direction where the tooltip opens relative to its anchor.doubleReturns the opacity of the tooltip, between 0 and 1.booleanReturns whether the tooltip listens to and fires mouse events.booleanReturns whether the tooltip is displayed permanently instead of only on hover.booleanisSticky()Returns whether the tooltip follows the mouse pointer instead of being fixed at its anchor.voidsetDirection(String direction) Sets the direction where the tooltip opens relative to its anchor.voidsetInteractive(boolean interactive) Sets whether the tooltip listens to and fires mouse events.voidsetOpacity(double opacity) Sets the opacity of the tooltip, between 0 and 1.voidsetPermanent(boolean permanent) Sets whether the tooltip is displayed permanently instead of only on hover.voidsetSticky(boolean sticky) Sets whether the tooltip follows the mouse pointer instead of being fixed at its anchor.Methods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.ui.DivOverlay
getClassName, getContent, getLatLng, getOffset, setClassName, setContent, setLatLng, setOffsetMethods 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
listens, off, off, onMethods 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, toggleTooltip
-
Constructor Details
-
Tooltip
Creates a new tooltip with the given HTML content and assigns it to thetooltipPane.- Parameters:
content- the HTML content of the tooltip
-
-
Method Details
-
getDirection
Returns the direction where the tooltip opens relative to its anchor. Possible values areright,left,top,bottom,centerandauto.- Returns:
- the direction where the tooltip opens
-
setDirection
Sets the direction where the tooltip opens relative to its anchor. Possible values areright,left,top,bottom,centerandauto.- Parameters:
direction- the direction where the tooltip opens
-
isPermanent
public boolean isPermanent()Returns whether the tooltip is displayed permanently instead of only on hover.- Returns:
trueif the tooltip is permanent,falseotherwise
-
setPermanent
public void setPermanent(boolean permanent) Sets whether the tooltip is displayed permanently instead of only on hover.- Parameters:
permanent-trueto display the tooltip permanently,falseotherwise
-
isSticky
public boolean isSticky()Returns whether the tooltip follows the mouse pointer instead of being fixed at its anchor.- Returns:
trueif the tooltip is sticky,falseotherwise
-
setSticky
public void setSticky(boolean sticky) Sets whether the tooltip follows the mouse pointer instead of being fixed at its anchor.- Parameters:
sticky-trueto make the tooltip follow the mouse pointer,falseotherwise
-
isInteractive
public boolean isInteractive()Returns whether the tooltip listens to and fires mouse events.- Returns:
trueif the tooltip is interactive,falseotherwise
-
setInteractive
public void setInteractive(boolean interactive) Sets whether the tooltip listens to and fires mouse events.- Parameters:
interactive-trueto make the tooltip interactive,falseotherwise
-
getOpacity
public double getOpacity()Returns the opacity of the tooltip, between 0 and 1.- Returns:
- the opacity of the tooltip
-
setOpacity
public void setOpacity(double opacity) Sets the opacity of the tooltip, between 0 and 1.- Parameters:
opacity- the opacity of the tooltip
-