Package io.jmix.flowui.data.grid
Class ContainerDataGridItems<T>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
io.jmix.flowui.data.grid.ContainerDataGridItems<T>
- All Implemented Interfaces:
com.vaadin.flow.data.provider.DataProvider<T,
,Void> ContainerDataUnit<T>
,DataUnit
,EntityDataUnit
,DataGridItems<T>
,DataGridItems.Sortable<T>
,EntityDataGridItems<T>
,HasType<T>
,Serializable
- Direct Known Subclasses:
ContainerTreeDataGridItems
public class ContainerDataGridItems<T>
extends com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
implements ContainerDataUnit<T>, EntityDataGridItems<T>, DataGridItems.Sortable<T>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.grid.DataGridItems
DataGridItems.ItemSetChangeEvent<T>, DataGridItems.SelectedItemChangeEvent<T>, DataGridItems.Sortable<T>, DataGridItems.ValueChangeEvent<T>
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
-
Field Summary
-
Constructor Summary
-
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 state change listener.com.vaadin.flow.shared.Registration
Registers a new value change listener.protected void
protected void
protected void
boolean
containsItem
(T item) protected Sort
createSort
(Object[] propertyId, boolean[] ascending) void
protected EventBus
getItems()
getState()
getType()
protected void
initContainer
(CollectionContainer<T> container) boolean
void
void
setSelectedItem
(T item) Set current item in the source.int
void
void
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
-
container
-
suppressSorting
protected boolean suppressSorting
-
-
Constructor Details
-
ContainerDataGridItems
-
-
Method Details
-
initContainer
-
containerItemChanged
-
containerCollectionChanged
-
containerItemPropertyChanged
-
getItems
- Specified by:
getItems
in interfaceDataGridItems<T>
- Returns:
- unmodifiable collection of items
-
getSelectedItem
- Specified by:
getSelectedItem
in interfaceDataGridItems<T>
- Returns:
- the current item contained in the source
-
setSelectedItem
Description copied from interface:DataGridItems
Set current item in the source.- Specified by:
setSelectedItem
in interfaceDataGridItems<T>
- Parameters:
item
- the item to set
-
containsItem
- Specified by:
containsItem
in interfaceDataGridItems<T>
- Parameters:
item
- an item to check- Returns:
true
if the underlying collection contains an item,false
otherwise
-
sort
- Specified by:
sort
in interfaceDataGridItems.Sortable<T>
-
createSort
-
resetSortOrder
public void resetSortOrder()- Specified by:
resetSortOrder
in interfaceDataGridItems.Sortable<T>
-
suppressSorting
public void suppressSorting()- Specified by:
suppressSorting
in interfaceDataGridItems.Sortable<T>
-
enableSorting
public void enableSorting()- Specified by:
enableSorting
in interfaceDataGridItems.Sortable<T>
-
addValueChangeListener
public com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<DataGridItems.ValueChangeEvent<T>> listener) Description copied from interface:DataGridItems
Registers a new value change listener.- Specified by:
addValueChangeListener
in interfaceDataGridItems<T>
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addItemSetChangeListener
public com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<DataGridItems.ItemSetChangeEvent<T>> listener) Description copied from interface:DataGridItems
Registers a new item set change listener.- Specified by:
addItemSetChangeListener
in interfaceDataGridItems<T>
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addSelectedItemChangeListener
public com.vaadin.flow.shared.Registration addSelectedItemChangeListener(Consumer<DataGridItems.SelectedItemChangeEvent<T>> listener) Description copied from interface:DataGridItems
Registers a new selected item change listener.- Specified by:
addSelectedItemChangeListener
in interfaceDataGridItems<T>
- 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
-
getItem
-
getContainer
- Specified by:
getContainer
in interfaceContainerDataUnit<T>
-
getState
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
addStateChangeListener
public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) Description copied from interface:DataUnit
Registers a new state change listener.- Specified by:
addStateChangeListener
in interfaceDataUnit
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
getType
-
getEventBus
-