Class ContainerDataVectorSourceItems<E>

java.lang.Object
io.jmix.mapsflowui.component.data.ContainerDataVectorSourceItems<E>
All Implemented Interfaces:
DataUnit, EntityDataUnit, DataVectorSourceItems<E>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class ContainerDataVectorSourceItems<E> extends Object implements DataVectorSourceItems<E>, org.springframework.context.ApplicationContextAware
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • geometryPropertiesResolver

      protected GeometryPropertiesResolver geometryPropertiesResolver
    • container

      protected InstanceContainer<E> container
    • metaPropertyPath

      protected MetaPropertyPath metaPropertyPath
    • events

      protected EventBus events
  • Constructor Details

  • Method Details

    • getEntityMetaClass

      public MetaClass getEntityMetaClass()
      Specified by:
      getEntityMetaClass in interface EntityDataUnit
      Returns:
      MetaClass of an entity contained in the source
    • getState

      public BindingState getState()
      Specified by:
      getState in interface DataUnit
      Returns:
      a state of this source
    • addStateChangeListener

      public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener)
      Description copied from interface: DataUnit
      Registers a new state change listener.
      Specified by:
      addStateChangeListener in interface DataUnit
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addGeometryChangeListener

      public com.vaadin.flow.shared.Registration addGeometryChangeListener(Consumer<DataVectorSourceItems.GeometryChangeEvent<E>> listener)
      Description copied from interface: DataVectorSourceItems
      Registers a new geometry change listener.
      Specified by:
      addGeometryChangeListener in interface DataVectorSourceItems<E>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addItemSetChangeListener

      public com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<DataVectorSourceItems.ItemSetChangeEvent<E>> listener)
      Description copied from interface: DataVectorSourceItems
      Registers a new item set change listener.
      Specified by:
      addItemSetChangeListener in interface DataVectorSourceItems<E>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • getItems

      public Collection<E> getItems()
      Specified by:
      getItems in interface DataVectorSourceItems<E>
      Returns:
      collection of items contained in the source
    • getMetaPropertyPath

      public MetaPropertyPath getMetaPropertyPath()
      Specified by:
      getMetaPropertyPath in interface DataVectorSourceItems<E>
      Returns:
      a meta property path of the specified geometry property from which will be displayed geo-objects
    • containerItemChanged

      protected void containerItemChanged(InstanceContainer.ItemChangeEvent<E> event)
    • containerItemPropertyChanged

      protected void containerItemPropertyChanged(InstanceContainer.ItemPropertyChangeEvent<E> event)
    • containerCollectionChanged

      protected void containerCollectionChanged(@Nullable CollectionContainer.CollectionChangeEvent<E> event)
    • 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
    • initGeometryProperty

      protected void initGeometryProperty()
    • subscribeToGeometryPropertyPathContainers

      protected void subscribeToGeometryPropertyPathContainers()
      Subscribes to every item change in property path to correctly handle property change event. It enables using InstanceContainer and property path together.
    • getAnnotatedGeometryProperty

      protected String getAnnotatedGeometryProperty()