Package io.jmix.flowui.component
Interface ListDataComponent<T>
- Type Parameters:
T
- item type
- All Known Implementing Classes:
DataGrid
,TreeDataGrid
public interface ListDataComponent<T>
A component that displays list of items.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Deselects all selected rows.getItems()
Returns a set of items corresponding to the selected rows of this component.Returns an item corresponding to the selected row of this component.boolean
void
select
(Collection<T> items) Selects the rows of this component for a given collection of items.void
Selects a row of this component for a given item.
-
Method Details
-
getSingleSelectedItem
Returns an item corresponding to the selected row of this component. If nothing is selected, the method returnsnull
. If multiple selection mode is enabled, returns the first selected instance.- Returns:
- an item corresponding to the selected row of this component
-
getSelectedItems
Returns a set of items corresponding to the selected rows of this component. If nothing is selected, the method returns aCollections.emptySet()
.- Returns:
- a set of item instances corresponding to the selected rows of
this component, never
null
-
select
Selects a row of this component for a given item.- Parameters:
item
- item instance to select the row
-
select
Selects the rows of this component for a given collection of items.- Parameters:
items
- collection of items to select rows
-
deselect
-
deselectAll
void deselectAll()Deselects all selected rows. -
getItems
- Returns:
- a data unit that holds component items
-
isMultiSelect
boolean isMultiSelect()- Returns:
true
if multiple selection mode is enabled
-