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, TYPEFields inherited from class com.jbstrap.jbmap.layers.Layer
componentContent, params, parent -
Constructor Summary
ConstructorsConstructorDescriptionPopupPoint(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.intGets the PopupPoint maximum height.intGets the PopupPoint's maximum width.intGets the PopupPoint's minimum width.voidonLayerDrawn(LayerDrawnEvent event) Registering the events for the popup draw event in the popup component.voidonLayerHide(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, showMethods inherited from class com.jbstrap.jbmap.layers.Layer
getContent, runAfterDrawOnLayer, runOnHideOnLayer, runOnShowOnLayerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 thenameorcoordinatesparameter 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:
drawin interfaceContainerLayer<PopupPoint>- Returns:
- The layer class instance
-
onLayerDrawn
Registering the events for the popup draw event in the popup component.- Specified by:
onLayerDrawnin interfaceDelayedInit- Parameters:
event- A layer drawn event component
-
onLayerHide
Registering the events for the popup hide event in the popup component.- Specified by:
onLayerHidein interfaceLayerHideEventHandler- Parameters:
event- The popupPoint or divPoint hide event component
-