Package com.jbstrap.jbmap.layers.layer
Class PopupPoint
- All Implemented Interfaces:
com.jbstrap.core.event.handlers.BrowserEventHandler
,DelayedInit
,LayerHideEventHandler
,ContainerLayer<PopupPoint>
public class PopupPoint
extends BaseLayer<PopupPoint>
implements ContainerLayer<PopupPoint>, DelayedInit, LayerHideEventHandler
This class represents a Popup component on the map with designated coordinates. This popup, differently from the other popups, is not associated with a layer.
The popup's contents can be text or a JBStrap component. Read more about how to add JBStrap components in the
ContainerLayer
class.- Since:
- 4.0
- See Also:
-
Field Summary
Fields inherited from class com.jbstrap.jbmap.layers.BaseLayer
COORDINATES, layerStyle, NAME, POINT, POINT_TYPE, popup, POPUP_CONTENT, POPUP_ENABLED, POPUP_OPENED, TYPE
Fields inherited from class com.jbstrap.jbmap.layers.Layer
componentContent, params, parent
-
Constructor Summary
ConstructorDescriptionPopupPoint
(String name, Coordinates coordinates) Creates a popup that can be assigned to a point on the map with designated coordinates. -
Method Summary
Modifier and TypeMethodDescriptiondraw()
Sets the popup content.Gets the PopupPoint coordinates.int
Gets the PopupPoint maximum height.int
Gets the PopupPoint's maximum width.int
Gets the PopupPoint's minimum width.void
onLayerDrawn
(LayerDrawnEvent event) Registering the events for the popup draw event in the popup component.void
onLayerHide
(LayerHideEvent event) Registering the events for the popup hide event in the popup component.setCoordinates
(Coordinates coordinates) Sets the PopupPoint coordinates.setMaxHeight
(int maxHeight) Sets the PopupPoint maximum height.setMaxWidth
(int maxWidth) Sets the PopupPoint maximum width.setMinWidth
(int minWidth) Sets the PopupPoint's minimum width.Methods inherited from class com.jbstrap.jbmap.layers.BaseLayer
addClickHandler, addCustomParam, addMouseOutHandler, addMouseOverHandler, closePopup, getClickHandlers, getCustomParams, getGeometry, getMouseOutHandlers, getMouseOverHandlers, getName, getParams, getParent, getPopup, getPopupContent, getProperties, getTitle, hide, isPopupEnabled, isShown, openPopup, removeClickHandler, removeCustomParam, removeMouseOutHandler, removeMouseOverHandler, runJSLayer, runJSLayerGroup, setCoordinates, setCustomParams, setParent, setPopupContent, setPopupEnabled, setTitle, show
Methods inherited from class com.jbstrap.jbmap.layers.Layer
getContent, runAfterDrawOnLayer, runOnHideOnLayer, runOnShowOnLayer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.jbmap.layers.ContainerLayer
addComponent, addComponents, getComponentById, getComponents, getComponents, getComponentsByClass, removeAllComponents, removeComponent, removeComponent, removeComponents, replaceComponent
-
Constructor Details
-
PopupPoint
Creates a popup that can be assigned to a point on the map with designated coordinates.- Parameters:
name
- Unique IDcoordinates
- Popup coordinatesCoordinates
- Throws:
NullPointerException
- Thrown if the value of thename
orcoordinates
parameter isnull
-
-
Method Details
-
getCoordinates
Gets the PopupPoint coordinates.- Returns:
- PopupPoint coordinates
-
setCoordinates
Sets the PopupPoint coordinates.- Parameters:
coordinates
- A Coordinates type object that contains longitude and latitude values of a PopupPoint- Returns:
- The instantiated PopupPoint class
-
getMaxWidth
public int getMaxWidth()Gets the PopupPoint's maximum width.- Returns:
- PopupPoint maximum width
-
setMaxWidth
Sets the PopupPoint maximum width.- Parameters:
maxWidth
- PopupPoint maximum width- Returns:
- The instantiated PopupPoint class
-
getMinWidth
public int getMinWidth()Gets the PopupPoint's minimum width.- Returns:
- PopupPoint minimum width
-
setMinWidth
Sets the PopupPoint's minimum width.- Parameters:
minWidth
- PopupPoint minimum width- Returns:
- The instantiated PopupPoint class
-
getMaxHeight
public int getMaxHeight()Gets the PopupPoint maximum height.- Returns:
- PopupPoint maximum height
-
setMaxHeight
Sets the PopupPoint maximum height.- Parameters:
maxHeight
- PopupPoint maximum height- Returns:
- The instantiated PopupPoint class
-
draw
Sets the popup content.- Specified by:
draw
in interfaceContainerLayer<PopupPoint>
- Returns:
- The layer class instance
-
onLayerDrawn
Registering the events for the popup draw event in the popup component.- Specified by:
onLayerDrawn
in interfaceDelayedInit
- Parameters:
event
- A layer drawn event component
-
onLayerHide
Registering the events for the popup hide event in the popup component.- Specified by:
onLayerHide
in interfaceLayerHideEventHandler
- Parameters:
event
- The popupPoint or divPoint hide event component
-