Package com.vaadin.v7.client.connectors
Class SingleSelectionModelConnector.SingleSelectionModel
- java.lang.Object
-
- com.vaadin.v7.client.connectors.AbstractSelectionModelConnector.AbstractSelectionModel
-
- com.vaadin.v7.client.connectors.SingleSelectionModelConnector.SingleSelectionModel
-
- All Implemented Interfaces:
HasUserSelectionAllowed<elemental.json.JsonObject>,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>, HasUserSelectionAllowed<elemental.json.JsonObject>
SingleSelectionModel without a selection column renderer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.v7.client.widget.grid.selection.SelectionModel
SelectionModel.Multi<T>, SelectionModel.None<T>, SelectionModel.Single<T>
-
-
Constructor Summary
Constructors Constructor Description SingleSelectionModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeselect(elemental.json.JsonObject row)Deselects a row.elemental.json.JsonObjectgetSelectedRow()Returns the currently selected row.Renderer<Boolean>getSelectionColumnRenderer()Return theRendererresponsible for rendering the selection column.booleanisDeselectAllowed()Sets whether it's allowed to deselect the selected row through the UI.booleanisUserSelectionAllowed()Checks if the user is allowed to change the selection.voidreset()Resets the SelectionModel to the initial state.booleanselect(elemental.json.JsonObject row)Selects a row.voidsetDeselectAllowed(boolean deselectAllowed)Sets whether it's allowed to deselect the selected row through the UI.voidsetUserSelectionAllowed(boolean userSelectionAllowed)Sets whether the user is allowed to change the selection.-
Methods inherited from class com.vaadin.v7.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.v7.client.widget.grid.selection.SelectionModel
getSelectedRows, isSelected, setGrid
-
-
-
-
Method Detail
-
getSelectionColumnRenderer
public Renderer<Boolean> getSelectionColumnRenderer()
Description copied from interface:SelectionModelReturn theRendererresponsible for rendering the selection column.- Specified by:
getSelectionColumnRendererin interfaceSelectionModel<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:SelectionModelResets the SelectionModel to the initial state.This method can be called internally, for example, when the attached Grid's data source changes.
- Specified by:
resetin interfaceSelectionModel<elemental.json.JsonObject>- Overrides:
resetin classAbstractSelectionModelConnector.AbstractSelectionModel
-
select
public boolean select(elemental.json.JsonObject row)
Description copied from interface:SelectionModel.SingleSelects a row.- Specified by:
selectin interfaceSelectionModel.Single<elemental.json.JsonObject>- Parameters:
row- aGridrow object- Returns:
- true, if this row as not previously selected.
-
deselect
public boolean deselect(elemental.json.JsonObject row)
Description copied from interface:SelectionModel.SingleDeselects a row.This is a no-op unless
rowis the currently selected row.- Specified by:
deselectin interfaceSelectionModel.Single<elemental.json.JsonObject>- Parameters:
row- aGridrow object- Returns:
- true, if the currently selected row was deselected.
-
getSelectedRow
public elemental.json.JsonObject getSelectedRow()
Description copied from interface:SelectionModel.SingleReturns the currently selected row.- Specified by:
getSelectedRowin interfaceSelectionModel.Single<elemental.json.JsonObject>- Returns:
- a
Gridrow object or null, if nothing is selected.
-
setDeselectAllowed
public void setDeselectAllowed(boolean deselectAllowed)
Description copied from interface:SelectionModel.SingleSets whether it's allowed to deselect the selected row through the UI. Deselection is allowed by default.- Specified by:
setDeselectAllowedin interfaceSelectionModel.Single<elemental.json.JsonObject>- Parameters:
deselectAllowed-trueif the selected row can be deselected without selecting another row instead; otherwisefalse.
-
isDeselectAllowed
public boolean isDeselectAllowed()
Description copied from interface:SelectionModel.SingleSets whether it's allowed to deselect the selected row through the UI.- Specified by:
isDeselectAllowedin interfaceSelectionModel.Single<elemental.json.JsonObject>- Returns:
trueif deselection is allowed; otherwisefalse
-
isUserSelectionAllowed
public boolean isUserSelectionAllowed()
Description copied from interface:HasUserSelectionAllowedChecks if the user is allowed to change the selection.- Specified by:
isUserSelectionAllowedin interfaceHasUserSelectionAllowed<elemental.json.JsonObject>- Returns:
trueif the user is allowed to change the selection,falseotherwise
-
setUserSelectionAllowed
public void setUserSelectionAllowed(boolean userSelectionAllowed)
Description copied from interface:HasUserSelectionAllowedSets whether the user is allowed to change the selection.- Specified by:
setUserSelectionAllowedin interfaceHasUserSelectionAllowed<elemental.json.JsonObject>- Parameters:
userSelectionAllowed-trueif the user is allowed to change the selection,falseotherwise
-
-