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.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.mapsflowui.component.data.DataVectorSourceItems
DataVectorSourceItems.GeometryChangeEvent<E>, DataVectorSourceItems.ItemSetChangeEvent<E>
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected InstanceContainer<E>
protected EventBus
protected GeometryPropertiesResolver
protected MetaPropertyPath
-
Constructor Summary
ConstructorDescriptionContainerDataVectorSourceItems
(InstanceContainer<E> container) Deprecated.ContainerDataVectorSourceItems
(InstanceContainer<E> container, String property) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
Registers a new geometry change listener.com.vaadin.flow.shared.Registration
Registers a new item set change listener.com.vaadin.flow.shared.Registration
Registers a new state change listener.protected void
protected void
protected void
protected String
getItems()
getState()
protected void
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) protected void
Subscribes 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 withGeometry
annotation in an entity from the provided container. Due toGeometry
annotation, geometry property can be retrieved without specifying it in XML element.- Parameters:
container
- items container
-
-
Method Details
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
getState
-
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 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:DataVectorSourceItems
Registers a new geometry change listener.- Specified by:
addGeometryChangeListener
in 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:DataVectorSourceItems
Registers a new item set change listener.- Specified by:
addItemSetChangeListener
in 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:
getItems
in interfaceDataVectorSourceItems<E>
- Returns:
- collection of items contained in the source
-
getMetaPropertyPath
- Specified by:
getMetaPropertyPath
in 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:
setApplicationContext
in 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 usingInstanceContainer
and property path together. -
getAnnotatedGeometryProperty
-
ContainerDataVectorSourceItems(InstanceContainer, String)
instead