|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.widget.grid.selection.AbstractRowHandleSelectionModel<T>
com.vaadin.client.widget.grid.selection.SelectionModelSingle<T>
public class SelectionModelSingle<T>
Single-row selection model.
| 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 | |
|---|---|
SelectionModelSingle()
|
|
| Method Summary | |
|---|---|
boolean |
deselect(T row)
Deselects a row. |
protected boolean |
deselectByHandle(DataSource.RowHandle<T> handle)
Deselect a row, based on its RowHandle. |
T |
getSelectedRow()
Returns the currently selected row. |
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 |
isDeselectAllowed()
Sets whether it's allowed to deselect the selected row through the UI. |
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. |
boolean |
select(T row)
Selects a row. |
protected boolean |
selectByHandle(DataSource.RowHandle<T> handle)
Select a row, based on its RowHandle. |
void |
setDeselectAllowed(boolean deselectAllowed)
Sets whether it's allowed to deselect the selected row through the UI. |
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 |
|---|
public SelectionModelSingle()
| Method Detail |
|---|
public boolean isSelected(T row)
SelectionModel
isSelected in interface SelectionModel<T>row - row object instance
true, if the row given as argument is considered
selected.public Renderer<java.lang.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 boolean select(T row)
SelectionModel.Single
select in interface SelectionModel.Single<T>row - a Grid row object
public boolean deselect(T row)
SelectionModel.Single
This is a no-op unless row is the currently selected row.
deselect in interface SelectionModel.Single<T>row - a Grid row object
public T getSelectedRow()
SelectionModel.Single
getSelectedRow in interface SelectionModel.Single<T>Grid row object or null, if nothing is selected.public void reset()
SelectionModelThis method can be called internally, for example, when the attached Grid's data source changes.
reset in interface SelectionModel<T>public java.util.Collection<T> getSelectedRows()
SelectionModel
getSelectedRows in interface SelectionModel<T>protected boolean selectByHandle(DataSource.RowHandle<T> handle)
AbstractRowHandleSelectionModelRowHandle.
Note: this method may not fire selection change events.
selectByHandle in class AbstractRowHandleSelectionModel<T>handle - the handle to select by
true iff the selection state was changed by this
callprotected boolean deselectByHandle(DataSource.RowHandle<T> handle)
AbstractRowHandleSelectionModelRowHandle.
Note: this method may not fire selection change events.
deselectByHandle in class AbstractRowHandleSelectionModel<T>handle - the handle to deselect by
true iff the selection state was changed by this
callpublic void setDeselectAllowed(boolean deselectAllowed)
SelectionModel.Single
setDeselectAllowed in interface SelectionModel.Single<T>deselectAllowed - true if the selected row can be deselected
without selecting another row instead; otherwise
false.public boolean isDeselectAllowed()
SelectionModel.Single
isDeselectAllowed in interface SelectionModel.Single<T>true if deselection is allowed; otherwise
false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||