Class DataVectorSourceBinding<E>
java.lang.Object
io.jmix.mapsflowui.component.data.binding.DataVectorSourceBinding<E>
- All Implemented Interfaces:
JmixBinding,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
@Component("map_DataVectorSourceBinding")
@Scope("prototype")
public class DataVectorSourceBinding<E>
extends Object
implements JmixBinding, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected com.vaadin.flow.shared.Registrationprotected Map<Object,GeoObjectWrapper<E>> protected Consumer<GeoObjectWrapper.GeoObjectWrapperClickEvent<E>>protected DataVectorSourceItems<E>protected com.vaadin.flow.shared.Registrationprotected MetaPropertyPathprotected DataVectorSource<E> -
Constructor Summary
ConstructorsConstructorDescriptionDataVectorSourceBinding(DataVectorSource<E> source, DataVectorSourceItems<E> items) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddGeoObject(E entity) voidprotected voidapplyClickListeners(GeoObjectWrapper<E> geoObjectWrapper) voidbind()protected static ObjectgeoObjectKey(Object entity) Returns a key for the given geo-object to be used ingeoObjectsMap.protected voidmergeGeoObject(E entity) Invoked in case of replacing an existing entity with a new instance.protected voidprotected voidprotected voidprotected voidrefreshGeoObjects(Collection<E> entities) protected voidremoveGeoObject(E entity) protected voidremoveGeoObjectByKey(Object geoObjectKey) protected voidremoveWrapper(GeoObjectWrapper<E> wrapper) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidunbind()
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
source
-
items
-
itemSetChangeRegistration
protected com.vaadin.flow.shared.Registration itemSetChangeRegistration -
geometryChangeRegistration
protected com.vaadin.flow.shared.Registration geometryChangeRegistration -
metaPropertyPath
-
geoObjectsMap
-
geoObjectWrapperClickListener
-
-
Constructor Details
-
DataVectorSourceBinding
-
-
Method Details
-
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
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
bind
public void bind()- Specified by:
bindin interfaceJmixBinding
-
unbind
public void unbind()- Specified by:
unbindin interfaceJmixBinding
-
onItemSetChange
-
onGeometryChange
-
addGeoObject
-
removeGeoObject
-
mergeGeoObject
Invoked in case of replacing an existing entity with a new instance.Assumes that the previous item belongs to the layer.
-
refreshGeoObjects
-
removeGeoObjectByKey
-
removeWrapper
-
geoObjectKey
Returns a key for the given geo-object to be used ingeoObjectsMap. Returns entity id whenever possible, otherwise returns entity. -
applyClickListeners
-
onGeoObjectClick
-