public class SingleSelectionModelConnector.SingleSelectionModel extends AbstractSelectionModelConnector.AbstractSelectionModel implements SelectionModel.Single<elemental.json.JsonObject>
SelectionModel.Multi<T>, SelectionModel.None<T>, SelectionModel.Single<T>
Constructor and Description |
---|
SingleSelectionModel() |
Modifier and Type | Method and Description |
---|---|
boolean |
deselect(elemental.json.JsonObject row)
Deselects a row.
|
elemental.json.JsonObject |
getSelectedRow()
Returns the currently selected row.
|
Renderer<Boolean> |
getSelectionColumnRenderer()
Return the
Renderer responsible for rendering the selection
column. |
boolean |
isDeselectAllowed()
Sets whether it's allowed to deselect the selected row through the
UI.
|
void |
reset()
Resets the SelectionModel to the initial state.
|
boolean |
select(elemental.json.JsonObject row)
Selects a row.
|
void |
setDeselectAllowed(boolean deselectAllowed)
Sets whether it's allowed to deselect the selected row through the
UI.
|
getSelectedRows, isSelected, setGrid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSelectedRows, isSelected, setGrid
public Renderer<Boolean> getSelectionColumnRenderer()
SelectionModel
Renderer
responsible for rendering the selection
column.getSelectionColumnRenderer
in interface SelectionModel<elemental.json.JsonObject>
public void reset()
SelectionModel
This method can be called internally, for example, when the attached Grid's data source changes.
reset
in interface SelectionModel<elemental.json.JsonObject>
reset
in class AbstractSelectionModelConnector.AbstractSelectionModel
public boolean select(elemental.json.JsonObject row)
SelectionModel.Single
select
in interface SelectionModel.Single<elemental.json.JsonObject>
row
- a Grid
row objectpublic boolean deselect(elemental.json.JsonObject row)
SelectionModel.Single
This is a no-op unless row
is the currently selected row.
deselect
in interface SelectionModel.Single<elemental.json.JsonObject>
row
- a Grid
row objectpublic elemental.json.JsonObject getSelectedRow()
SelectionModel.Single
getSelectedRow
in interface SelectionModel.Single<elemental.json.JsonObject>
Grid
row object or null, if nothing is selected.public void setDeselectAllowed(boolean deselectAllowed)
SelectionModel.Single
setDeselectAllowed
in interface SelectionModel.Single<elemental.json.JsonObject>
deselectAllowed
- true
if the selected row can be deselected
without selecting another row instead; otherwise
false
.public boolean isDeselectAllowed()
SelectionModel.Single
isDeselectAllowed
in interface SelectionModel.Single<elemental.json.JsonObject>
true
if deselection is allowed; otherwise
false
Copyright © 2016 Vaadin Ltd. All rights reserved.