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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addItems
(Collection<T> items) final void
com.vaadin.flow.shared.Registration
Registers a new item set change listener.protected void
fireChangedEvent
(ChartItems.DataChangeOperation operation, List<T> items) protected EventBus
getItems()
boolean
void
void
removeItem
(T item) int
void
updateItem
(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, refreshItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getItems
in interfaceChartItems<T extends DataItem>
- Returns:
- unmodifiable collection of items
-
getItem
- Specified by:
getItem
in 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:ChartItems
Registers a new item set change listener.- Specified by:
addItemSetChangeListener
in 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
-