Class SelectionModelNone<T>
- java.lang.Object
-
- com.vaadin.client.widget.grid.selection.AbstractRowHandleSelectionModel<T>
-
- com.vaadin.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.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 boolean
deselectByHandle(DataSource.RowHandle<T> handle)
Deselect a row, based on itsRowHandle
.Collection<T>
getSelectedRows()
Returns a Collection containing all selected rows.Renderer<Boolean>
getSelectionColumnRenderer()
Return theRenderer
responsible for rendering the selection column.boolean
isSelected(T row)
Return true if the provided row is considered selected under the implementing selection model.void
reset()
Resets the SelectionModel to the initial state.protected boolean
selectByHandle(DataSource.RowHandle<T> handle)
Select a row, based on itsRowHandle
.void
setGrid(Grid<T> grid)
Tells this SelectionModel which Grid it belongs to.
-
-
-
Method Detail
-
isSelected
public boolean isSelected(T row)
Description copied from interface:SelectionModel
Return true if the provided row is considered selected under the implementing selection model.- Specified by:
isSelected
in 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:SelectionModel
Return theRenderer
responsible for rendering the selection column.- Specified by:
getSelectionColumnRenderer
in 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:SelectionModel
Tells 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:
setGrid
in interfaceSelectionModel<T>
- Parameters:
grid
- aGrid
instance;null
when removing from Grid
-
reset
public void reset()
Description copied from interface:SelectionModel
Resets the SelectionModel to the initial state.This method can be called internally, for example, when the attached Grid's data source changes.
- Specified by:
reset
in interfaceSelectionModel<T>
-
getSelectedRows
public Collection<T> getSelectedRows()
Description copied from interface:SelectionModel
Returns a Collection containing all selected rows.- Specified by:
getSelectedRows
in interfaceSelectionModel<T>
- Returns:
- a non-null collection.
-
selectByHandle
protected boolean selectByHandle(DataSource.RowHandle<T> handle) throws UnsupportedOperationException
Description copied from class:AbstractRowHandleSelectionModel
Select a row, based on itsRowHandle
.Note: this method may not fire selection change events.
- Specified by:
selectByHandle
in classAbstractRowHandleSelectionModel<T>
- Parameters:
handle
- the handle to select by- Returns:
true
iff 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:AbstractRowHandleSelectionModel
Deselect a row, based on itsRowHandle
.Note: this method may not fire selection change events.
- Specified by:
deselectByHandle
in classAbstractRowHandleSelectionModel<T>
- Parameters:
handle
- the handle to deselect by- Returns:
true
iff the selection state was changed by this call- Throws:
UnsupportedOperationException
- if the selection model does not support either handles or deselection
-
-