com.vaadin.client.connectors.grid.
Class SingleSelectionModelConnector.SingleSelectionModel
- java.lang.Object
-
- com.vaadin.client.connectors.grid.SingleSelectionModelConnector.SingleSelectionModel
-
All Implemented Interfaces:
SelectionModel<elemental.json.JsonObject>
Enclosing class:
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 protected
SingleSelectionModel()
-
Method Summary
All Methods Modifier and Type Method Description void
deselect(elemental.json.JsonObject item)
Deselects the given item.
void
deselectAll()
Deselects all currently selected items.
boolean
isDeselectAllowed()
Gets whether it's allowed to deselect the selected row through the UI.
boolean
isMultiSelectionAllowed()
Checks if the user is allowed to have more than on item selected.
boolean
isSelected(elemental.json.JsonObject item)
Returns whether the given item is currently selected.
boolean
isSelectionAllowed()
Checks if the user is allowed to change the selection.
void
select(elemental.json.JsonObject item)
Selects the given item.
void
setDeselectAllowed(boolean deselectAllowed)
Sets whether it's allowed to deselect the selected row through the UI.
void
setSelectionAllowed(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:
SelectionModel
Selects the given item. If another item was already selected, that item is deselected.
Specified by:
select
in interfaceSelectionModel<elemental.json.JsonObject>
Parameters:
item
- the item to select, not null
-
deselect
public void deselect(elemental.json.JsonObject item)
Description copied from interface:
SelectionModel
Deselects the given item. If the item is not currently selected, does nothing.
Specified by:
deselect
in interfaceSelectionModel<elemental.json.JsonObject>
Parameters:
item
- the item to deselect, not null
-
isSelected
public boolean isSelected(elemental.json.JsonObject item)
Description copied from interface:
SelectionModel
Returns whether the given item is currently selected.
Specified by:
isSelected
in interfaceSelectionModel<elemental.json.JsonObject>
Parameters:
item
- the item to check, not nullReturns:
true
if the item is selected,false
otherwise
-
deselectAll
public void deselectAll()
Description copied from interface:
SelectionModel
Deselects all currently selected items.
Specified by:
deselectAll
in interfaceSelectionModel<elemental.json.JsonObject>
-
setSelectionAllowed
public void setSelectionAllowed(boolean selectionAllowed)
Description copied from interface:
SelectionModel
Sets 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:
setSelectionAllowed
in interfaceSelectionModel<elemental.json.JsonObject>
Parameters:
selectionAllowed
-true
if the user is allowed to change the selection,false
otherwise
-
isSelectionAllowed
public boolean isSelectionAllowed()
Description copied from interface:
SelectionModel
Checks 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:
isSelectionAllowed
in interfaceSelectionModel<elemental.json.JsonObject>
Returns:
true
if the user is allowed to change the selection,false
otherwise
-
isMultiSelectionAllowed
public boolean isMultiSelectionAllowed()
Description copied from interface:
SelectionModel
Checks if the user is allowed to have more than on item selected.
Specified by:
isMultiSelectionAllowed
in interfaceSelectionModel<elemental.json.JsonObject>
Returns:
true
if the user is allowed to select multiple items,false
otherwise
-
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
-true
if 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:
true
if deselection is allowed; otherwisefalse
-
-