Class MultiSelectionModelConnector.MultiSelectionModel
- java.lang.Object
-
- com.vaadin.client.connectors.grid.MultiSelectionModelConnector.MultiSelectionModel
-
- All Implemented Interfaces:
SelectionModel<elemental.json.JsonObject>,SelectionModelWithSelectionColumn
- Enclosing class:
- MultiSelectionModelConnector
protected class MultiSelectionModelConnector.MultiSelectionModel extends Object implements SelectionModel<elemental.json.JsonObject>, SelectionModelWithSelectionColumn
Client side multiselection model implementation.
-
-
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 protectedMultiSelectionModel()
-
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.Renderer<Boolean>getRenderer()Returns a new instance of the Renderer for selection column.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.voidsetSelectionAllowed(boolean selectionAllowed)Sets whether the user is allowed to change the selection.
-
-
-
Method Detail
-
getRenderer
public Renderer<Boolean> getRenderer()
Description copied from interface:SelectionModelWithSelectionColumnReturns a new instance of the Renderer for selection column.- Specified by:
getRendererin interfaceSelectionModelWithSelectionColumn- Returns:
- selection column renderer
-
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
-
deselectAll
public void deselectAll()
Description copied from interface:SelectionModelDeselects all currently selected items.- Specified by:
deselectAllin interfaceSelectionModel<elemental.json.JsonObject>
-
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
-
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
-
-