T
- the type of the items to selectpublic interface SelectionModel<T>
Grid
component. Determines how items
can be selected and deselected.Modifier and Type | Interface and Description |
---|---|
static class |
SelectionModel.NoSelectionModel<T> |
Modifier and Type | Method and Description |
---|---|
void |
deselect(T item)
Deselects the given item.
|
void |
deselectAll()
Deselects all currently selected items.
|
static boolean |
isItemSelected(JsonObject item)
Gets the selected state from a given grid row json object.
|
boolean |
isMultiSelectionAllowed()
Checks if the user is allowed to have more than on item selected.
|
boolean |
isSelected(T item)
Returns whether the given item is currently selected.
|
boolean |
isSelectionAllowed()
Checks if the user is allowed to change the selection.
|
void |
select(T item)
Selects the given item.
|
void |
setSelectionAllowed(boolean selectionAllowed)
Sets whether the user is allowed to change the selection.
|
void select(T item)
item
- the item to select, not nullvoid deselect(T item)
item
- the item to deselect, not nullboolean isSelected(T item)
item
- the item to check, not nulltrue
if the item is selected, false
otherwisevoid deselectAll()
void setSelectionAllowed(boolean selectionAllowed)
The check is done only for the client side actions. It doesn't affect selection requests sent from the server side.
selectionAllowed
- true
if the user is allowed to change the
selection, false
otherwiseboolean isSelectionAllowed()
The check is done only for the client side actions. It doesn't affect selection requests sent from the server side.
true
if the user is allowed to change the selection,
false
otherwiseboolean isMultiSelectionAllowed()
true
if the user is allowed to select multiple
items, false
otherwisestatic boolean isItemSelected(JsonObject item)
item
- a json objecttrue
if the json object is marked as selected;
false
if notCopyright © 2019 Vaadin Ltd. All rights reserved.