com.vaadin.client.widget.grid.selection
Interface SelectionModel.Single<T>

Type Parameters:
T - type parameter corresponding with Grid row type
All Superinterfaces:
SelectionModel<T>
All Known Implementing Classes:
SelectionModelSingle, SingleSelectionModelConnector.SingleSelectionModel
Enclosing interface:
SelectionModel<T>

public static interface SelectionModel.Single<T>
extends SelectionModel<T>

Selection model that allows a maximum of one row to be selected at any one time.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.client.widget.grid.selection.SelectionModel
SelectionModel.Multi<T>, SelectionModel.None<T>, SelectionModel.Single<T>
 
Method Summary
 boolean deselect(T row)
          Deselects a row.
 T getSelectedRow()
          Returns the currently selected row.
 boolean isDeselectAllowed()
          Sets whether it's allowed to deselect the selected row through the UI.
 boolean select(T row)
          Selects a row.
 void setDeselectAllowed(boolean deselectAllowed)
          Sets whether it's allowed to deselect the selected row through the UI.
 
Methods inherited from interface com.vaadin.client.widget.grid.selection.SelectionModel
getSelectedRows, getSelectionColumnRenderer, isSelected, reset, setGrid
 

Method Detail

select

boolean select(T row)
Selects a row.

Parameters:
row - a Grid row object
Returns:
true, if this row as not previously selected.

deselect

boolean deselect(T row)
Deselects a row.

This is a no-op unless row is the currently selected row.

Parameters:
row - a Grid row object
Returns:
true, if the currently selected row was deselected.

getSelectedRow

T getSelectedRow()
Returns the currently selected row.

Returns:
a Grid row object or null, if nothing is selected.

setDeselectAllowed

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; otherwise false.

isDeselectAllowed

boolean isDeselectAllowed()
Sets whether it's allowed to deselect the selected row through the UI.

Returns:
true if deselection is allowed; otherwise false


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.