com.vaadin.client.widget.grid.selection
Class SelectionModelNone<T>

java.lang.Object
  extended by com.vaadin.client.widget.grid.selection.AbstractRowHandleSelectionModel<T>
      extended by 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
SelectionModelNone()
           
 
Method Summary
protected  boolean deselectByHandle(DataSource.RowHandle<T> handle)
          Deselect a row, based on its RowHandle.
 java.util.Collection<T> getSelectedRows()
          Returns a Collection containing all selected rows.
 Renderer<java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionModelNone

public SelectionModelNone()
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 interface SelectionModel<T>
Parameters:
row - row object instance
Returns:
true, if the row given as argument is considered selected.

getSelectionColumnRenderer

public Renderer<java.lang.Boolean> getSelectionColumnRenderer()
Description copied from interface: SelectionModel
Return the Renderer responsible for rendering the selection column.

Specified by:
getSelectionColumnRenderer in interface SelectionModel<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 interface SelectionModel<T>
Parameters:
grid - a Grid 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 interface SelectionModel<T>

getSelectedRows

public java.util.Collection<T> getSelectedRows()
Description copied from interface: SelectionModel
Returns a Collection containing all selected rows.

Specified by:
getSelectedRows in interface SelectionModel<T>
Returns:
a non-null collection.

selectByHandle

protected boolean selectByHandle(DataSource.RowHandle<T> handle)
                          throws java.lang.UnsupportedOperationException
Description copied from class: AbstractRowHandleSelectionModel
Select a row, based on its RowHandle.

Note: this method may not fire selection change events.

Specified by:
selectByHandle in class AbstractRowHandleSelectionModel<T>
Parameters:
handle - the handle to select by
Returns:
true iff the selection state was changed by this call
Throws:
java.lang.UnsupportedOperationException - if the selection model does not support either handles or selection

deselectByHandle

protected boolean deselectByHandle(DataSource.RowHandle<T> handle)
                            throws java.lang.UnsupportedOperationException
Description copied from class: AbstractRowHandleSelectionModel
Deselect a row, based on its RowHandle.

Note: this method may not fire selection change events.

Specified by:
deselectByHandle in class AbstractRowHandleSelectionModel<T>
Parameters:
handle - the handle to deselect by
Returns:
true iff the selection state was changed by this call
Throws:
java.lang.UnsupportedOperationException - if the selection model does not support either handles or deselection


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