Class Popup
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.popup.Popup
- All Implemented Interfaces:
Serializable,Evented,Identifiable,LayerPopupFunctions,LayerTooltipFunctions,ExecutableFunctions
Used to open popups in certain places of the map. 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 padding kept between the popup and the map borders during auto-panning.Returns the bottom-right padding kept between the popup and the map borders during auto-panning.Returns the top-left padding kept between the popup and the map borders during auto-panning.Returns the maximum height of the popup, in pixels.Returns the maximum width of the popup, in pixels.Returns the minimum width of the popup, in pixels.booleanReturns whether the popup is automatically closed when another popup is opened.booleanReturns whether the map is panned when the popup is opened so it does not overlap the map borders.booleanReturns whether a close button is shown in the popup.booleanReturns whether the popup is closed when the map is clicked.booleanReturns whether the popup is closed when the escape key is pressed.booleanReturns whether the popup is kept in view by panning the map when it is about to leave the visible area.voidsetAutoClose(boolean autoClose) Sets whether the popup is automatically closed when another popup is opened.voidsetAutoPan(boolean autoPan) Sets whether the map is panned when the popup is opened so it does not overlap the map borders.voidsetAutoPanPadding(Point autoPanPadding) Sets the padding kept between the popup and the map borders during auto-panning.voidsetAutoPanPaddingBottomRight(Point autoPanPaddingBottomRight) Sets the bottom-right padding kept between the popup and the map borders during auto-panning.voidsetAutoPanPaddingTopLeft(Point autoPanPaddingTopLeft) Sets the top-left padding kept between the popup and the map borders during auto-panning.voidsetCloseButton(boolean closeButton) Sets whether a close button is shown in the popup.voidsetCloseOnClick(boolean closeOnClick) Sets whether the popup is closed when the map is clicked.voidsetCloseOnEscapeKey(boolean closeOnEscapeKey) Sets whether the popup is closed when the escape key is pressed.voidsetKeepInView(boolean keepInView) Sets whether the popup is kept in view by panning the map when it is about to leave the visible area.voidsetMaxHeight(Integer maxHeight) Sets the maximum height of the popup, in pixels.voidsetMaxWidth(Integer maxWidth) Sets the maximum width of the popup, in pixels.voidsetMinWidth(Integer minWidth) Sets the minimum width of the popup, in pixels.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
-
Popup
Creates a new popup with the given HTML content and assigns it to thepopupPane.- Parameters:
content- the HTML content of the popup
-
-
Method Details
-
getMaxWidth
Returns the maximum width of the popup, in pixels.- Returns:
- the maximum width of the popup, in pixels
-
setMaxWidth
Sets the maximum width of the popup, in pixels.- Parameters:
maxWidth- the maximum width of the popup, in pixels
-
getMinWidth
Returns the minimum width of the popup, in pixels.- Returns:
- the minimum width of the popup, in pixels
-
setMinWidth
Sets the minimum width of the popup, in pixels.- Parameters:
minWidth- the minimum width of the popup, in pixels
-
getMaxHeight
Returns the maximum height of the popup, in pixels. If set, a scrollbar is shown when the content exceeds this height.- Returns:
- the maximum height of the popup, in pixels
-
setMaxHeight
Sets the maximum height of the popup, in pixels. If set, a scrollbar is shown when the content exceeds this height.- Parameters:
maxHeight- the maximum height of the popup, in pixels
-
isAutoPan
public boolean isAutoPan()Returns whether the map is panned when the popup is opened so it does not overlap the map borders.- Returns:
trueif the map is panned to fit the popup,falseotherwise
-
setAutoPan
public void setAutoPan(boolean autoPan) Sets whether the map is panned when the popup is opened so it does not overlap the map borders.- Parameters:
autoPan-trueto pan the map to fit the popup,falseotherwise
-
getAutoPanPaddingTopLeft
Returns the top-left padding kept between the popup and the map borders during auto-panning.- Returns:
- the top-left auto-pan padding, in pixels
-
setAutoPanPaddingTopLeft
Sets the top-left padding kept between the popup and the map borders during auto-panning.- Parameters:
autoPanPaddingTopLeft- the top-left auto-pan padding, in pixels
-
getAutoPanPaddingBottomRight
Returns the bottom-right padding kept between the popup and the map borders during auto-panning.- Returns:
- the bottom-right auto-pan padding, in pixels
-
setAutoPanPaddingBottomRight
Sets the bottom-right padding kept between the popup and the map borders during auto-panning.- Parameters:
autoPanPaddingBottomRight- the bottom-right auto-pan padding, in pixels
-
getAutoPanPadding
Returns the padding kept between the popup and the map borders during auto-panning. Equivalent to setting both top-left and bottom-right padding to the same value.- Returns:
- the auto-pan padding, in pixels
-
setAutoPanPadding
Sets the padding kept between the popup and the map borders during auto-panning. Equivalent to setting both top-left and bottom-right padding to the same value.- Parameters:
autoPanPadding- the auto-pan padding, in pixels
-
isKeepInView
public boolean isKeepInView()Returns whether the popup is kept in view by panning the map when it is about to leave the visible area.- Returns:
trueif the popup is kept in view,falseotherwise
-
setKeepInView
public void setKeepInView(boolean keepInView) Sets whether the popup is kept in view by panning the map when it is about to leave the visible area.- Parameters:
keepInView-trueto keep the popup in view,falseotherwise
-
isCloseButton
public boolean isCloseButton()Returns whether a close button is shown in the popup.- Returns:
trueif a close button is shown,falseotherwise
-
setCloseButton
public void setCloseButton(boolean closeButton) Sets whether a close button is shown in the popup.- Parameters:
closeButton-trueto show a close button,falseotherwise
-
isAutoClose
public boolean isAutoClose()Returns whether the popup is automatically closed when another popup is opened.- Returns:
trueif the popup closes automatically,falseotherwise
-
setAutoClose
public void setAutoClose(boolean autoClose) Sets whether the popup is automatically closed when another popup is opened.- Parameters:
autoClose-trueto close the popup automatically,falseotherwise
-
isCloseOnEscapeKey
public boolean isCloseOnEscapeKey()Returns whether the popup is closed when the escape key is pressed.- Returns:
trueif the popup closes on the escape key,falseotherwise
-
setCloseOnEscapeKey
public void setCloseOnEscapeKey(boolean closeOnEscapeKey) Sets whether the popup is closed when the escape key is pressed.- Parameters:
closeOnEscapeKey-trueto close the popup on the escape key,falseotherwise
-
isCloseOnClick
public boolean isCloseOnClick()Returns whether the popup is closed when the map is clicked.- Returns:
trueif the popup closes on map click,falseotherwise
-
setCloseOnClick
public void setCloseOnClick(boolean closeOnClick) Sets whether the popup is closed when the map is clicked.- Parameters:
closeOnClick-trueto close the popup on map click,falseotherwise
-