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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEventNested classes/interfaces inherited from interface io.jmix.mapsflowui.component.data.DataVectorSourceItems
DataVectorSourceItems.GeometryChangeEvent<E>, DataVectorSourceItems.ItemSetChangeEvent<E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected InstanceContainer<E>protected EventBusprotected GeometryPropertiesResolverprotected MetaPropertyPath -
Constructor Summary
ConstructorsConstructorDescriptionContainerDataVectorSourceItems(InstanceContainer<E> container) Deprecated.ContainerDataVectorSourceItems(InstanceContainer<E> container, String property) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationRegisters a new geometry change listener.com.vaadin.flow.shared.RegistrationRegisters a new item set change listener.com.vaadin.flow.shared.RegistrationRegisters a new state change listener.protected voidprotected voidprotected voidprotected StringgetItems()getState()protected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) protected voidSubscribes to every item change in property path to correctly handle property change event.
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
geometryPropertiesResolver
-
container
-
metaPropertyPath
-
events
-
-
Constructor Details
-
ContainerDataVectorSourceItems
-
ContainerDataVectorSourceItems
Deprecated.Constructor should be used together withGeometryannotation in an entity from the provided container. Due toGeometryannotation, geometry property can be retrieved without specifying it in XML element.- Parameters:
container- items container
-
-
Method Details
-
getEntityMetaClass
- Specified by:
getEntityMetaClassin interfaceEntityDataUnit- Returns:
MetaClassof an entity contained in the source
-
getState
-
addStateChangeListener
public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) Description copied from interface:DataUnitRegisters a new state change listener.- Specified by:
addStateChangeListenerin interfaceDataUnit- 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:DataVectorSourceItemsRegisters a new geometry change listener.- Specified by:
addGeometryChangeListenerin interfaceDataVectorSourceItems<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:DataVectorSourceItemsRegisters a new item set change listener.- Specified by:
addItemSetChangeListenerin interfaceDataVectorSourceItems<E>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
getItems
- Specified by:
getItemsin interfaceDataVectorSourceItems<E>- Returns:
- collection of items contained in the source
-
getMetaPropertyPath
- Specified by:
getMetaPropertyPathin interfaceDataVectorSourceItems<E>- Returns:
- a meta property path of the specified geometry property from which will be displayed geo-objects
-
containerItemChanged
-
containerItemPropertyChanged
-
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:
setApplicationContextin interfaceorg.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 usingInstanceContainerand property path together. -
getAnnotatedGeometryProperty
-
ContainerDataVectorSourceItems(InstanceContainer, String)instead