public class SelectionModelNone<T> extends AbstractRowHandleSelectionModel<T> implements SelectionModel.None<T>
SelectionModel.Multi<T>, SelectionModel.None<T>, SelectionModel.Single<T>| Constructor and Description |
|---|
SelectionModelNone() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
deselectByHandle(DataSource.RowHandle<T> handle)
Deselect a row, based on its
RowHandle. |
Collection<T> |
getSelectedRows()
Returns a Collection containing all selected rows.
|
Renderer<Boolean> |
getSelectionColumnRenderer()
Return the
Renderer 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 its
RowHandle. |
void |
setGrid(Grid<T> grid)
Tells this SelectionModel which Grid it belongs to.
|
public boolean isSelected(T row)
SelectionModelisSelected in interface SelectionModel<T>row - row object instancetrue, if the row given as argument is considered
selected.public Renderer<Boolean> getSelectionColumnRenderer()
SelectionModelRenderer responsible for rendering the selection
column.getSelectionColumnRenderer in interface SelectionModel<T>public void setGrid(Grid<T> grid)
SelectionModelImplementations are free to have this be a no-op. This method is called internally by Grid.
setGrid in interface SelectionModel<T>grid - a Grid instance; null when removing from
Gridpublic void reset()
SelectionModelThis method can be called internally, for example, when the attached Grid's data source changes.
reset in interface SelectionModel<T>public Collection<T> getSelectedRows()
SelectionModelgetSelectedRows in interface SelectionModel<T>protected boolean selectByHandle(DataSource.RowHandle<T> handle) throws UnsupportedOperationException
AbstractRowHandleSelectionModelRowHandle.
Note: this method may not fire selection change events.
selectByHandle in class AbstractRowHandleSelectionModel<T>handle - the handle to select bytrue iff the selection state was changed by this
callUnsupportedOperationException - if the selection model does not support either handles or
selectionprotected boolean deselectByHandle(DataSource.RowHandle<T> handle) throws UnsupportedOperationException
AbstractRowHandleSelectionModelRowHandle.
Note: this method may not fire selection change events.
deselectByHandle in class AbstractRowHandleSelectionModel<T>handle - the handle to deselect bytrue iff the selection state was changed by this
callUnsupportedOperationException - if the selection model does not support either handles or
deselectionCopyright © 2016 Vaadin Ltd. All rights reserved.