Class AbstractDataVectorSourceBinding<E>
java.lang.Object
io.jmix.mapsflowui.component.data.binding.AbstractDataVectorSourceBinding<E>
- All Implemented Interfaces:
JmixBinding
- Direct Known Subclasses:
ClusterDataVectorSourceBinding,DataVectorSourceBinding,HeatmapDataVectorSourceBinding
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe event is fired when a geographic object has been removed. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.shared.Registrationprotected Map<Object,GeoObjectWrapper<E>> protected Consumer<GeoObjectWrapper.GeoObjectWrapperClickEvent<E>>protected DataVectorSourceItems<E>protected com.vaadin.flow.shared.Registrationprotected MetaPropertyPathprotected AbstractDataVectorSource<E> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDataVectorSourceBinding(AbstractDataVectorSource<E> source, DataVectorSourceItems<E> items) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddGeoObject(E entity) com.vaadin.flow.shared.RegistrationaddGeoObjectRemovedListener(Consumer<AbstractDataVectorSourceBinding.GeoObjectRemovedEvent<E>> listener) Adds a listener to be notified of geographic object removal.protected voidapplyClickListeners(GeoObjectWrapper<E> geoObjectWrapper) protected abstract voidapplyFeatureModifyStyleProvider(GeoObjectWrapper<E> geoObjectWrapper, E entity) protected abstract voidapplyFeatureProperties(GeoObjectWrapper<E> geoObjectWrapper, E entity) protected abstract voidapplyFeatureSelectStyleProvider(GeoObjectWrapper<E> geoObjectWrapper, E entity) protected abstract voidapplyFeatureStyleProvider(GeoObjectWrapper<E> geoObjectWrapper, E entity) protected voidapplyStyles(GeoObjectWrapper<E> geoObjectWrapper, E entity) voidbind()Processes the binding operation.protected abstract GeoObjectWrapper<E>createGeoObjectWrapper(E entity, MetaPropertyPath metaPropertyPath) protected voidfireGeoObjectRemovedEvent(Object geoObjectId) static ObjectgeoObjectKey(Object entity) Returns a key for the given geo-object to be used ingeoObjectsMap.protected EventBusprotected voidmergeGeoObject(E entity) Invoked in case of replacing an existing entity with a new instance.protected voidprotected voidprotected voidprotected voidprotected voidrefreshGeoObjects(Collection<E> entities) protected voidremoveGeoObject(E entity) protected voidremoveGeoObjectByKey(Object geoObjectKey) protected voidremoveWrapper(GeoObjectWrapper<E> wrapper) voidunbind()Processes the unbinding operation.
-
Field Details
-
source
-
items
-
itemSetChangeRegistration
protected com.vaadin.flow.shared.Registration itemSetChangeRegistration -
geometryChangeRegistration
protected com.vaadin.flow.shared.Registration geometryChangeRegistration -
geoObjectsMap
-
metaPropertyPath
-
geoObjectWrapperClickListener
-
-
Constructor Details
-
AbstractDataVectorSourceBinding
public AbstractDataVectorSourceBinding(AbstractDataVectorSource<E> source, DataVectorSourceItems<E> items)
-
-
Method Details
-
getGeoObjects
-
bind
public void bind()Description copied from interface:JmixBindingProcesses the binding operation.- Specified by:
bindin interfaceJmixBinding
-
unbind
public void unbind()Description copied from interface:JmixBindingProcesses the unbinding operation.- Specified by:
unbindin interfaceJmixBinding
-
addGeoObjectRemovedListener
public com.vaadin.flow.shared.Registration addGeoObjectRemovedListener(Consumer<AbstractDataVectorSourceBinding.GeoObjectRemovedEvent<E>> listener) Adds a listener to be notified of geographic object removal.- Parameters:
listener- listener to be added- Returns:
- a registration object for removing an added listener
-
onItemSetChange
-
onValueChange
-
onGeometryChange
-
addGeoObject
-
createGeoObjectWrapper
@Nullable protected abstract GeoObjectWrapper<E> createGeoObjectWrapper(E entity, MetaPropertyPath metaPropertyPath) -
applyFeatureProperties
-
applyFeatureStyleProvider
-
applyFeatureSelectStyleProvider
protected abstract void applyFeatureSelectStyleProvider(GeoObjectWrapper<E> geoObjectWrapper, E entity) -
applyFeatureModifyStyleProvider
protected abstract void applyFeatureModifyStyleProvider(GeoObjectWrapper<E> geoObjectWrapper, E entity) -
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. -
applyStyles
-
applyClickListeners
-
onGeoObjectClick
-
fireGeoObjectRemovedEvent
-
getEventBus
-