Package com.vaadin.flow.data.provider
Class DataChangeEvent.ItemsAddedEvent<T>
java.lang.Object
java.util.EventObject
com.vaadin.flow.data.provider.DataChangeEvent<T>
com.vaadin.flow.data.provider.DataChangeEvent.ItemsAddedEvent<T>
- Type Parameters:
T- the data type
- All Implemented Interfaces:
Serializable
- Enclosing class:
DataChangeEvent<T>
An event fired when items have been added to a
DataProvider, or
moved to a new position in it. All other items are unchanged.
A listener that does not need the details can handle this event like any
other DataChangeEvent. A listing component uses it to update the
item count and the visible items while keeping the state it holds for the
unchanged items, such as components rendered for them.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.data.provider.DataChangeEvent
DataChangeEvent.DataRefreshEvent<T>, DataChangeEvent.ItemsAddedEvent<T>, DataChangeEvent.ItemsRemovedEvent<T> -
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionItemsAddedEvent(DataProvider<T, ?> source, Collection<T> items) Creates a new event originating from the given data provider. -
Method Summary
Methods inherited from class com.vaadin.flow.data.provider.DataChangeEvent
getSource, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ItemsAddedEvent
Creates a new event originating from the given data provider.- Parameters:
source- the data provider, notnullitems- the added items, notnull
-
-
Method Details
-
getItems
Gets the added items.- Returns:
- an unmodifiable list of the added items, never
null
-