com.vaadin.client.connectors
Class SingleSelectionModelConnector.SingleSelectionModel

java.lang.Object
  extended by com.vaadin.client.connectors.AbstractSelectionModelConnector.AbstractSelectionModel
      extended by com.vaadin.client.connectors.SingleSelectionModelConnector.SingleSelectionModel
All Implemented Interfaces:
SelectionModel<elemental.json.JsonObject>, SelectionModel.Single<elemental.json.JsonObject>
Enclosing class:
SingleSelectionModelConnector

public class SingleSelectionModelConnector.SingleSelectionModel
extends AbstractSelectionModelConnector.AbstractSelectionModel
implements SelectionModel.Single<elemental.json.JsonObject>

SingleSelectionModel without a selection column renderer.


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
SingleSelectionModelConnector.SingleSelectionModel()
           
 
Method Summary
 boolean deselect(elemental.json.JsonObject row)
          Deselects a row.
 elemental.json.JsonObject getSelectedRow()
          Returns the currently selected row.
 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.
 void reset()
          Resets the SelectionModel to the initial state.
 boolean select(elemental.json.JsonObject row)
          Selects a row.
 void setDeselectAllowed(boolean deselectAllowed)
          Sets whether it's allowed to deselect the selected row through the UI.
 
Methods inherited from class com.vaadin.client.connectors.AbstractSelectionModelConnector.AbstractSelectionModel
getSelectedRows, isSelected, setGrid
 
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, isSelected, setGrid
 

Constructor Detail

SingleSelectionModelConnector.SingleSelectionModel

public SingleSelectionModelConnector.SingleSelectionModel()
Method Detail

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<elemental.json.JsonObject>
Returns:
a renderer instance. If null is returned, a selection column will not be drawn.

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<elemental.json.JsonObject>
Overrides:
reset in class AbstractSelectionModelConnector.AbstractSelectionModel

select

public boolean select(elemental.json.JsonObject row)
Description copied from interface: SelectionModel.Single
Selects a row.

Specified by:
select in interface SelectionModel.Single<elemental.json.JsonObject>
Parameters:
row - a Grid row object
Returns:
true, if this row as not previously selected.

deselect

public boolean deselect(elemental.json.JsonObject row)
Description copied from interface: SelectionModel.Single
Deselects a row.

This is a no-op unless row is the currently selected row.

Specified by:
deselect in interface SelectionModel.Single<elemental.json.JsonObject>
Parameters:
row - a Grid row object
Returns:
true, if the currently selected row was deselected.

getSelectedRow

public elemental.json.JsonObject getSelectedRow()
Description copied from interface: SelectionModel.Single
Returns the currently selected row.

Specified by:
getSelectedRow in interface SelectionModel.Single<elemental.json.JsonObject>
Returns:
a Grid row object or null, if nothing is selected.

setDeselectAllowed

public void setDeselectAllowed(boolean deselectAllowed)
Description copied from interface: SelectionModel.Single
Sets whether it's allowed to deselect the selected row through the UI. Deselection is allowed by default.

Specified by:
setDeselectAllowed in interface SelectionModel.Single<elemental.json.JsonObject>
Parameters:
deselectAllowed - true if the selected row can be deselected without selecting another row instead; otherwise false.

isDeselectAllowed

public boolean isDeselectAllowed()
Description copied from interface: SelectionModel.Single
Sets whether it's allowed to deselect the selected row through the UI.

Specified by:
isDeselectAllowed in interface SelectionModel.Single<elemental.json.JsonObject>
Returns:
true if deselection is allowed; otherwise false


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