com.vaadin.client.connectors.
Class SingleSelectionModelConnector.SingleSelectionModel
- java.lang.Object
-
- com.vaadin.client.connectors.AbstractSelectionModelConnector.AbstractSelectionModel
-
- com.vaadin.client.connectors.SingleSelectionModelConnector.SingleSelectionModel
-
All Implemented Interfaces:
HasUserSelectionAllowed<JsonObject>
,SelectionModel<JsonObject>
,SelectionModel.Single<JsonObject>
Enclosing class:
public class SingleSelectionModelConnector.SingleSelectionModel extends AbstractSelectionModelConnector.AbstractSelectionModel implements SelectionModel.Single<JsonObject>, HasUserSelectionAllowed<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
Constructors Constructor Description SingleSelectionModel()
-
Method Summary
All Methods Modifier and Type Method Description boolean
deselect(JsonObject row)
Deselects a row.
JsonObject
getSelectedRow()
Returns the currently selected row.
Renderer<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
isUserSelectionAllowed()
Checks if the user is allowed to change the selection.
void
reset()
Resets the SelectionModel to the initial state.
boolean
select(JsonObject row)
Selects a row.
void
setDeselectAllowed(boolean deselectAllowed)
Sets whether it's allowed to deselect the selected row through the UI.
void
setUserSelectionAllowed(boolean userSelectionAllowed)
Sets whether the user is allowed to change the selection.
-
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
-
-
-
-
Method Detail
-
getSelectionColumnRenderer
public Renderer<Boolean> getSelectionColumnRenderer()
Description copied from interface:
SelectionModel
Return the
Renderer
responsible for rendering the selection column.Specified by:
getSelectionColumnRenderer
in interfaceSelectionModel<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 interfaceSelectionModel<JsonObject>
Overrides:
reset
in classAbstractSelectionModelConnector.AbstractSelectionModel
-
select
public boolean select(JsonObject row)
Description copied from interface:
SelectionModel.Single
Selects a row.
Specified by:
select
in interfaceSelectionModel.Single<JsonObject>
Parameters:
row
- aGrid
row objectReturns:
true, if this row as not previously selected.
-
deselect
public boolean deselect(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 interfaceSelectionModel.Single<JsonObject>
Parameters:
row
- aGrid
row objectReturns:
true, if the currently selected row was deselected.
-
getSelectedRow
public JsonObject getSelectedRow()
Description copied from interface:
SelectionModel.Single
Returns the currently selected row.
Specified by:
getSelectedRow
in interfaceSelectionModel.Single<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 interfaceSelectionModel.Single<JsonObject>
Parameters:
deselectAllowed
-true
if the selected row can be deselected without selecting another row instead; otherwisefalse
.
-
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 interfaceSelectionModel.Single<JsonObject>
Returns:
true
if deselection is allowed; otherwisefalse
-
isUserSelectionAllowed
public boolean isUserSelectionAllowed()
Description copied from interface:
HasUserSelectionAllowed
Checks if the user is allowed to change the selection.
Specified by:
isUserSelectionAllowed
in interfaceHasUserSelectionAllowed<JsonObject>
Returns:
true
if the user is allowed to change the selection,false
otherwise
-
setUserSelectionAllowed
public void setUserSelectionAllowed(boolean userSelectionAllowed)
Description copied from interface:
HasUserSelectionAllowed
Sets whether the user is allowed to change the selection.
Specified by:
setUserSelectionAllowed
in interfaceHasUserSelectionAllowed<JsonObject>
Parameters:
userSelectionAllowed
-true
if the user is allowed to change the selection,false
otherwise
-
-