Class WLeafletMap.AbstractOverlayItem
- Direct Known Subclasses:
WLeafletMap.Popup,WLeafletMap.Tooltip
- Enclosing class:
- WLeafletMap
This is the base class for all AbstractMapItems that can be added to other AbstractMapItems. This is an abstract class, so it should not be used directly.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedAbstractOverlayItem(WLeafletMap.Coordinate pos, WWidget content) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidBrings thisWLeafletMap.AbstractOverlayItemto the back.voidBrings thisWLeafletMap.AbstractOverlayItemto the front.voidclose()Closes theWLeafletMap.AbstractOverlayItem.closed()Signalemited after theWLeafletMap.AbstractOverlayItemwas closed.Get the content.booleanisOpen()Returns whether theWLeafletMap.AbstractOverlayItemis open.voidopen()Opens theWLeafletMap.AbstractOverlayItem.opened()Signalemited after theWLeafletMap.AbstractOverlayItemwas opened.voidsetContent(WWidget content) Set the content.voidsetContent(CharSequence content) Set the content.protected voidsetMap(WLeafletMap map) Set the map this item belongs to.voidsetOptions(com.google.gson.JsonObject options) Set the options of theWLeafletMap.AbstractOverlayItem.voidtoggle()Opens or closes theWLeafletMap.AbstractOverlayItem.Methods inherited from class eu.webtoolkit.jwt.WLeafletMap.AbstractMapItem
clicked, createItemJS, doubleClicked, getMap, getPosition, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, move, needsUpdate, unrender, updateMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
AbstractOverlayItem
Constructor.Creates a new
WLeafletMap.AbstractOverlayItemthat has the given coordinates.Since this is an abstract class, this should not be used directly.
-
AbstractOverlayItem
Constructor.Creates a new
WLeafletMap.AbstractOverlayItemwith the given content and that has the given coordinates.Since this is an abstract class, this should not be used directly.
-
-
Method Details
-
setOptions
public void setOptions(com.google.gson.JsonObject options) Set the options of theWLeafletMap.AbstractOverlayItem.Set the options that will be passed to the
WLeafletMapWLeafletMap.AbstractOverlayItemat construction.See https://leafletjs.com/reference.html for the list of options.
Note: Modifying the options after the
WLeafletMap.AbstractOverlayItemhas been loaded by the user will not work as theWLeafletMap.AbstractOverlayItemwas already constructed. Some option like 'content' can be changed after load using the appropriate function.- See Also:
-
setContent
Set the content. -
setContent
Set the content. -
getContent
Get the content.- See Also:
-
open
public void open()Opens theWLeafletMap.AbstractOverlayItem. -
close
public void close()Closes theWLeafletMap.AbstractOverlayItem. -
toggle
public void toggle()Opens or closes theWLeafletMap.AbstractOverlayItem. -
isOpen
public boolean isOpen()Returns whether theWLeafletMap.AbstractOverlayItemis open. -
opened
Signalemited after theWLeafletMap.AbstractOverlayItemwas opened.- See Also:
-
closed
Signalemited after theWLeafletMap.AbstractOverlayItemwas closed.- See Also:
-
bringToFront
public void bringToFront()Brings thisWLeafletMap.AbstractOverlayItemto the front.This brings this
WLeafletMap.AbstractOverlayItemto the front of otherWLeafletMap.AbstractOverlayItemof the same type.Warning: This function only works after the
WLeafletMap.AbstractOverlayItemis added to the map.- See Also:
-
bringToBack
public void bringToBack()Brings thisWLeafletMap.AbstractOverlayItemto the back.This brings this
WLeafletMap.AbstractOverlayItemto the back of otherWLeafletMap.AbstractOverlayItemof the same type.Warning: This function only works after the
WLeafletMap.AbstractOverlayItemis added to the map.- See Also:
-
setMap
Description copied from class:WLeafletMap.AbstractMapItemSet the map this item belongs to.This is called to set the map the item belongs to. You can override this function if you need to do something when the item is added to a map.
You should not call this function directly.
- Overrides:
setMapin classWLeafletMap.AbstractMapItem- See Also:
-