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

java.lang.Object
  extended by com.vaadin.client.widget.grid.selection.AbstractRowHandleSelectionModel<T>
Type Parameters:
T - The grid's row type
All Implemented Interfaces:
SelectionModel<T>
Direct Known Subclasses:
SelectionModelMulti, SelectionModelNone, SelectionModelSingle

public abstract class AbstractRowHandleSelectionModel<T>
extends java.lang.Object
implements SelectionModel<T>

An abstract class that adds a consistent API for common methods that's needed by Vaadin's server-based selection models to work.

Note: This should be an interface instead of an abstract class, if only we could define protected methods in an interface.

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
AbstractRowHandleSelectionModel()
           
 
Method Summary
protected abstract  boolean deselectByHandle(DataSource.RowHandle<T> handle)
          Deselect a row, based on its RowHandle.
protected abstract  boolean selectByHandle(DataSource.RowHandle<T> handle)
          Select a row, based on its RowHandle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.client.widget.grid.selection.SelectionModel
getSelectedRows, getSelectionColumnRenderer, isSelected, reset, setGrid
 

Constructor Detail

AbstractRowHandleSelectionModel

public AbstractRowHandleSelectionModel()
Method Detail

selectByHandle

protected abstract boolean selectByHandle(DataSource.RowHandle<T> handle)
Select a row, based on its RowHandle.

Note: this method may not fire selection change events.

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 abstract boolean deselectByHandle(DataSource.RowHandle<T> handle)
                                     throws java.lang.UnsupportedOperationException
Deselect a row, based on its RowHandle.

Note: this method may not fire selection change events.

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.