Class VectorLayerHolder<T>

java.lang.Object
io.jmix.mapsui.component.leaflet.translators.VectorLayerHolder<T>
All Implemented Interfaces:
HasContextMenu, LeafletLayerHolder<LFeatureGroup>, LeafletMapAware, Refreshable, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class VectorLayerHolder<T> extends Object implements LeafletLayerHolder<LFeatureGroup>, LeafletMapAware, org.springframework.context.ApplicationContextAware, Refreshable, HasContextMenu
  • Method Details

    • itemsSetChanged

      protected void itemsSetChanged(VectorLayerItems.ItemSetChangeEvent<T> event)
    • initLeafletLayer

      protected void initLeafletLayer()
    • initGeometryChangedSubscription

      protected void initGeometryChangedSubscription()
    • addGeoObject

      protected GeoObjectWrapper<T> addGeoObject(T entity)
    • removeGeoObject

      protected void removeGeoObject(T entity)
    • removeGeoObjectByKey

      protected void removeGeoObjectByKey(Object geoObjectKey)
    • removeWrapper

      protected void removeWrapper(GeoObjectWrapper<?> wrapper)
    • mergeGeoObject

      protected void mergeGeoObject(T entity)
      Invoked in case of replacing an existing entity with a new instance.

      Assumes that the previous item belongs to the layer.

    • geoObjectKey

      protected static Object geoObjectKey(Object entity)
      Returns a key for the given geo-object to be used in geoObjectsMap. Returns entity id whenever possible, otherwise returns entity.
    • applyWeightForPoint

      protected void applyWeightForPoint(GeoObjectWrapper<?> wrapper)
      Applies weight value for a point (if the weight property is specified in the clustering options).
      Parameters:
      wrapper - point wrapper
    • ensureItemSelection

      protected void ensureItemSelection(T entity)
      Invoke when geo-object's wrapper is changed.

      Ensures the editable mode for the selected geo-object's wrapper.

    • isEditable

      protected boolean isEditable()
    • onGeoObjectClick

      protected void onGeoObjectClick(T clickedGeoObject)
    • addContextMenuHandlers

      protected void addContextMenuHandlers()
    • createContextMenuInvocationContext

      public ContextMenuInvocationContext createContextMenuInvocationContext()
    • setContextMenuProcessor

      public void setContextMenuProcessor(ContextMenuProcessor contextMenuProcessor)
      Specified by:
      setContextMenuProcessor in interface HasContextMenu
    • setLeafletMap

      public void setLeafletMap(LMap leafletMap)
      Specified by:
      setLeafletMap in interface LeafletMapAware
    • setEditableMap

      public void setEditableMap(LEditableMap lEditableMap)
      Specified by:
      setEditableMap in interface LeafletMapAware
    • getLeafletLayer

      public LFeatureGroup getLeafletLayer()
      Description copied from interface: LeafletLayerHolder
      Gets the LeafletLayer
      Specified by:
      getLeafletLayer in interface LeafletLayerHolder<T>
      Returns:
      Leaflet layer component
    • getVectorLayer

      public VectorLayer<T> getVectorLayer()
    • activate

      public void activate()
      Description copied from interface: LeafletLayerHolder
      When a layer corresponding to the holder is selected, this method is invoked in order to switch the holder into an active mode, which basically means enable listeners and turn on a drawing mode if needed.
      Specified by:
      activate in interface LeafletLayerHolder<T>
    • deactivate

      public void deactivate()
      Description copied from interface: LeafletLayerHolder
      This method is invoked when the layer corresponding to the holder is no more active and it signals the holder to switch off listeners and a drawing mode.
      Specified by:
      deactivate in interface LeafletLayerHolder<T>
    • shutdown

      public void shutdown()
      Description copied from interface: LeafletLayerHolder
      Signals that the holder is no more needed (for example when it is replaced with another holder instance).
      Specified by:
      shutdown in interface LeafletLayerHolder<T>
    • refresh

      public void refresh()
      Specified by:
      refresh in interface Refreshable
    • refreshParameters

      public void refreshParameters(Collection<String> changedParameters)
      Specified by:
      refreshParameters in interface Refreshable
    • notifyConnector

      protected void notifyConnector()
    • getGeoObjectWrappersMap

      public Map<Object,GeoObjectWrapper<T>> getGeoObjectWrappersMap()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setMessages

      public void setMessages(Messages messages)