Class ListChartItems<T extends DataItem>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
io.jmix.chartsflowui.kit.data.chart.ListChartItems<T>
- All Implemented Interfaces:
com.vaadin.flow.data.provider.DataProvider<T,,Void> ChartItems<T>,Serializable
public class ListChartItems<T extends DataItem>
extends com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
implements ChartItems<T>
Data provider for a Chart component in which all items are stored in
List.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.chartsflowui.kit.data.chart.ChartItems
ChartItems.DataChangeOperation, ChartItems.ItemSetChangeEvent<T extends DataItem> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddItems(Collection<T> items) final voidcom.vaadin.flow.shared.RegistrationRegisters a new item set change listener.protected voidfireChangedEvent(ChartItems.DataChangeOperation operation, List<T> items) protected EventBusgetItems()booleanvoidvoidremoveItem(T item) intvoidupdateItem(T item) Update an item in the data provider if it is already there.Methods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem, refreshItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.provider.DataProvider
getId, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
-
Field Details
-
items
-
-
Constructor Details
-
ListChartItems
public ListChartItems() -
ListChartItems
-
ListChartItems
-
-
Method Details
-
getItems
- Specified by:
getItemsin interfaceChartItems<T extends DataItem>- Returns:
- unmodifiable collection of items
-
getItem
- Specified by:
getItemin interfaceChartItems<T extends DataItem>- Parameters:
id- the item id- Returns:
- the item by the given id
-
addItem
-
addItems
-
addItems
-
updateItem
Update an item in the data provider if it is already there.- Parameters:
item- an item to be updated- Throws:
IllegalArgumentException- if no such element found
-
removeItem
-
removeAll
public void removeAll() -
fireChangedEvent
-
addItemSetChangeListener
public com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<ChartItems.ItemSetChangeEvent<T>> listener) Description copied from interface:ChartItemsRegisters a new item set change listener.- Specified by:
addItemSetChangeListenerin interfaceChartItems<T extends DataItem>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
isInMemory
public boolean isInMemory() -
size
-
fetch
-
getEventBus
-