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:
  • Constructor Details

    • PopupPoint

      public PopupPoint(String name, Coordinates coordinates)
      Creates a popup that can be assigned to a point on the map with designated coordinates.
      Parameters:
      name - Unique ID
      coordinates - Popup coordinates Coordinates
      Throws:
      NullPointerException - Thrown if the value of the name or coordinates parameter is null
  • Method Details

    • getCoordinates

      public Coordinates getCoordinates()
      Gets the PopupPoint coordinates.
      Returns:
      PopupPoint coordinates
    • setCoordinates

      public PopupPoint setCoordinates(Coordinates coordinates)
      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

      public PopupPoint setMaxWidth(int maxWidth)
      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

      public PopupPoint setMinWidth(int minWidth)
      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

      public PopupPoint setMaxHeight(int maxHeight)
      Sets the PopupPoint maximum height.
      Parameters:
      maxHeight - PopupPoint maximum height
      Returns:
      The instantiated PopupPoint class
    • draw

      public PopupPoint draw()
      Sets the popup content.
      Specified by:
      draw in interface ContainerLayer<PopupPoint>
      Returns:
      The layer class instance
    • onLayerDrawn

      public void onLayerDrawn(LayerDrawnEvent event)
      Registering the events for the popup draw event in the popup component.
      Specified by:
      onLayerDrawn in interface DelayedInit
      Parameters:
      event - A layer drawn event component
    • onLayerHide

      public void onLayerHide(LayerHideEvent event)
      Registering the events for the popup hide event in the popup component.
      Specified by:
      onLayerHide in interface LayerHideEventHandler
      Parameters:
      event - The popupPoint or divPoint hide event component