Package io.jmix.flowui.data.grid
Interface GridDataItems<T>
- All Superinterfaces:
com.vaadin.flow.data.provider.DataProvider<T,
,Void> DataUnit
,HasType<T>
,Serializable
- All Known Subinterfaces:
EntityGridDataItems<E>
,EntityTreeGridDataItems<T>
,GridDataItems.Sortable<T>
,TreeGridDataItems<T>
- All Known Implementing Classes:
AbstractContainerGridDataProvider
,JmixGridDataProvider
,JmixTreeGridDataProvider
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
An event that is fired when item set is changed.static class
An event that is fired when selected item is changed.static interface
The DataGridItems that supports sorting.static class
An event that is fired when value of item property is changed.Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
Registers a new item set change listener.com.vaadin.flow.shared.Registration
Registers a new selected item change listener.com.vaadin.flow.shared.Registration
Registers a new value change listener.boolean
containsItem
(T item) getItemByIndex
(int index) getItems()
getItems
(int startIndex, int numberOfItems) getItemValue
(Object itemId, MetaPropertyPath propertyId) int
indexOfItem
(T item) void
setSelectedItem
(T item) Set current item in the source.int
size()
Methods inherited from interface com.vaadin.flow.data.provider.DataProvider
addDataProviderListener, fetch, getId, isInMemory, refreshAll, refreshItem, refreshItem, size, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
Methods inherited from interface io.jmix.flowui.data.DataUnit
addStateChangeListener, getState
-
Method Details
-
getItemId
- Parameters:
item
- the item for obtaining the id- Returns:
- the id on the given item
-
getItem
- Parameters:
itemId
- the item id- Returns:
- the item by the given id
-
getItemValue
- Parameters:
itemId
- the item idpropertyId
- the property id- Returns:
- the item value
-
indexOfItem
- Parameters:
item
- the item for obtaining the index- Returns:
- the index of the given item
-
getItemByIndex
- Parameters:
index
- the item index- Returns:
- the item by the given index
-
getItems
- Returns:
- the stream of all items
-
getItems
- Parameters:
startIndex
- the start indexnumberOfItems
- the number of items- Returns:
- items from the
startIndex
and size not exceeding the specified number
-
containsItem
- Parameters:
item
- an item to check- Returns:
true
if the underlying collection contains an item,false
otherwise
-
size
int size()- Returns:
- size of the underlying collection
-
getSelectedItem
- Returns:
- the current item contained in the source
-
setSelectedItem
Set current item in the source.- Parameters:
item
- the item to set
-
addValueChangeListener
com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<GridDataItems.ValueChangeEvent<T>> listener) Registers a new value change listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addItemSetChangeListener
com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<GridDataItems.ItemSetChangeEvent<T>> listener) Registers a new item set change listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addSelectedItemChangeListener
com.vaadin.flow.shared.Registration addSelectedItemChangeListener(Consumer<GridDataItems.SelectedItemChangeEvent<T>> listener) Registers a new selected item change listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-