Class SelectionModelNone<T>
- java.lang.Object
-
- com.vaadin.v7.client.widget.grid.selection.AbstractRowHandleSelectionModel<T>
-
- com.vaadin.v7.client.widget.grid.selection.SelectionModelNone<T>
-
- All Implemented Interfaces:
SelectionModel<T>,SelectionModel.None<T>
public class SelectionModelNone<T> extends AbstractRowHandleSelectionModel<T> implements SelectionModel.None<T>
No-row selection model.- Since:
- 7.4
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.v7.client.widget.grid.selection.SelectionModel
SelectionModel.Multi<T>, SelectionModel.None<T>, SelectionModel.Single<T>
-
-
Constructor Summary
Constructors Constructor Description SelectionModelNone()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandeselectByHandle(DataSource.RowHandle<T> handle)Deselect a row, based on itsRowHandle.Collection<T>getSelectedRows()Returns a Collection containing all selected rows.Renderer<Boolean>getSelectionColumnRenderer()Return theRendererresponsible for rendering the selection column.booleanisSelected(T row)Return true if the provided row is considered selected under the implementing selection model.voidreset()Resets the SelectionModel to the initial state.protected booleanselectByHandle(DataSource.RowHandle<T> handle)Select a row, based on itsRowHandle.voidsetGrid(Grid<T> grid)Tells this SelectionModel which Grid it belongs to.
-
-
-
Method Detail
-
isSelected
public boolean isSelected(T row)
Description copied from interface:SelectionModelReturn true if the provided row is considered selected under the implementing selection model.- Specified by:
isSelectedin interfaceSelectionModel<T>- Parameters:
row- row object instance- Returns:
true, if the row given as argument is considered selected.
-
getSelectionColumnRenderer
public Renderer<Boolean> getSelectionColumnRenderer()
Description copied from interface:SelectionModelReturn theRendererresponsible for rendering the selection column.- Specified by:
getSelectionColumnRendererin interfaceSelectionModel<T>- Returns:
- a renderer instance. If null is returned, a selection column will not be drawn.
-
setGrid
public void setGrid(Grid<T> grid)
Description copied from interface:SelectionModelTells this SelectionModel which Grid it belongs to.Implementations are free to have this be a no-op. This method is called internally by Grid.
- Specified by:
setGridin interfaceSelectionModel<T>- Parameters:
grid- aGridinstance;nullwhen removing from Grid
-
reset
public void reset()
Description copied from interface:SelectionModelResets the SelectionModel to the initial state.This method can be called internally, for example, when the attached Grid's data source changes.
- Specified by:
resetin interfaceSelectionModel<T>
-
getSelectedRows
public Collection<T> getSelectedRows()
Description copied from interface:SelectionModelReturns a Collection containing all selected rows.- Specified by:
getSelectedRowsin interfaceSelectionModel<T>- Returns:
- a non-null collection.
-
selectByHandle
protected boolean selectByHandle(DataSource.RowHandle<T> handle) throws UnsupportedOperationException
Description copied from class:AbstractRowHandleSelectionModelSelect a row, based on itsRowHandle.Note: this method may not fire selection change events.
- Specified by:
selectByHandlein classAbstractRowHandleSelectionModel<T>- Parameters:
handle- the handle to select by- Returns:
trueif the selection state was changed by this call- Throws:
UnsupportedOperationException- if the selection model does not support either handles or selection
-
deselectByHandle
protected boolean deselectByHandle(DataSource.RowHandle<T> handle) throws UnsupportedOperationException
Description copied from class:AbstractRowHandleSelectionModelDeselect a row, based on itsRowHandle.Note: this method may not fire selection change events.
- Specified by:
deselectByHandlein classAbstractRowHandleSelectionModel<T>- Parameters:
handle- the handle to deselect by- Returns:
trueif the selection state was changed by this call- Throws:
UnsupportedOperationException- if the selection model does not support either handles or deselection
-
-