Class SingleSelectionModelConnector.SingleSelectionModel
- java.lang.Object
-
- com.vaadin.client.connectors.grid.SingleSelectionModelConnector.SingleSelectionModel
-
- All Implemented Interfaces:
SelectionModel<elemental.json.JsonObject>
- Enclosing class:
- SingleSelectionModelConnector
protected class SingleSelectionModelConnector.SingleSelectionModel extends Object implements SelectionModel<elemental.json.JsonObject>
Single selection model for grid.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.client.widget.grid.selection.SelectionModel
SelectionModel.NoSelectionModel<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSingleSelectionModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeselect(elemental.json.JsonObject item)Deselects the given item.voiddeselectAll()Deselects all currently selected items.booleanisDeselectAllowed()Gets whether it's allowed to deselect the selected row through the UI.booleanisMultiSelectionAllowed()Checks if the user is allowed to have more than on item selected.booleanisSelected(elemental.json.JsonObject item)Returns whether the given item is currently selected.booleanisSelectionAllowed()Checks if the user is allowed to change the selection.voidselect(elemental.json.JsonObject item)Selects the given item.voidsetDeselectAllowed(boolean deselectAllowed)Sets whether it's allowed to deselect the selected row through the UI.voidsetSelectionAllowed(boolean selectionAllowed)Sets whether the user is allowed to change the selection.
-
-
-
Method Detail
-
select
public void select(elemental.json.JsonObject item)
Description copied from interface:SelectionModelSelects the given item. If another item was already selected, that item is deselected.- Specified by:
selectin interfaceSelectionModel<elemental.json.JsonObject>- Parameters:
item- the item to select, not null
-
deselect
public void deselect(elemental.json.JsonObject item)
Description copied from interface:SelectionModelDeselects the given item. If the item is not currently selected, does nothing.- Specified by:
deselectin interfaceSelectionModel<elemental.json.JsonObject>- Parameters:
item- the item to deselect, not null
-
isSelected
public boolean isSelected(elemental.json.JsonObject item)
Description copied from interface:SelectionModelReturns whether the given item is currently selected.- Specified by:
isSelectedin interfaceSelectionModel<elemental.json.JsonObject>- Parameters:
item- the item to check, not null- Returns:
trueif the item is selected,falseotherwise
-
deselectAll
public void deselectAll()
Description copied from interface:SelectionModelDeselects all currently selected items.- Specified by:
deselectAllin interfaceSelectionModel<elemental.json.JsonObject>
-
setSelectionAllowed
public void setSelectionAllowed(boolean selectionAllowed)
Description copied from interface:SelectionModelSets whether the user is allowed to change the selection.The check is done only for the client side actions. It doesn't affect selection requests sent from the server side.
- Specified by:
setSelectionAllowedin interfaceSelectionModel<elemental.json.JsonObject>- Parameters:
selectionAllowed-trueif the user is allowed to change the selection,falseotherwise
-
isSelectionAllowed
public boolean isSelectionAllowed()
Description copied from interface:SelectionModelChecks if the user is allowed to change the selection.The check is done only for the client side actions. It doesn't affect selection requests sent from the server side.
- Specified by:
isSelectionAllowedin interfaceSelectionModel<elemental.json.JsonObject>- Returns:
trueif the user is allowed to change the selection,falseotherwise
-
isMultiSelectionAllowed
public boolean isMultiSelectionAllowed()
Description copied from interface:SelectionModelChecks if the user is allowed to have more than on item selected.- Specified by:
isMultiSelectionAllowedin interfaceSelectionModel<elemental.json.JsonObject>- Returns:
trueif the user is allowed to select multiple items,falseotherwise
-
setDeselectAllowed
public void setDeselectAllowed(boolean deselectAllowed)
Sets whether it's allowed to deselect the selected row through the UI. Deselection is allowed by default.- Parameters:
deselectAllowed-trueif the selected row can be deselected without selecting another row instead; otherwisefalse.
-
isDeselectAllowed
public boolean isDeselectAllowed()
Gets whether it's allowed to deselect the selected row through the UI.- Returns:
trueif deselection is allowed; otherwisefalse
-
-