com.vaadin.ui
Class Grid.SingleSelectionModel
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
com.vaadin.ui.Grid.AbstractGridExtension
com.vaadin.ui.Grid.AbstractSelectionModel
com.vaadin.ui.Grid.SingleSelectionModel
- All Implemented Interfaces:
- MethodEventSource, ClientConnector, DataGenerator, Extension, com.vaadin.shared.Connector, Grid.SelectionModel, Grid.SelectionModel.Single, java.io.Serializable
- Enclosing class:
- Grid
public static class Grid.SingleSelectionModel
- extends Grid.AbstractSelectionModel
- implements Grid.SelectionModel.Single
A default implementation of a Grid.SelectionModel.Single
- See Also:
- Serialized Form
|
Method Summary |
protected void |
extend(AbstractClientConnector target)
Add this extension to the target connector. |
java.lang.Object |
getSelectedRow()
Gets the item id of the currently selected item. |
protected com.vaadin.shared.ui.grid.selection.SingleSelectionModelState |
getState()
Returns the shared state for this connector. |
boolean |
isDeselectAllowed()
Sets whether it's allowed to deselect the selected row through
the UI. |
void |
reset()
Resets the selection state. |
boolean |
select(java.lang.Object itemId)
Marks an item as selected. |
protected boolean |
select(java.lang.Object itemId,
boolean refresh)
|
void |
setDeselectAllowed(boolean deselectAllowed)
Sets whether it's allowed to deselect the selected row through
the UI. |
| Methods inherited from class com.vaadin.server.AbstractClientConnector |
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.server.ClientConnector |
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
| Methods inherited from interface com.vaadin.shared.Connector |
getConnectorId |
Grid.SingleSelectionModel
public Grid.SingleSelectionModel()
extend
protected void extend(AbstractClientConnector target)
- Description copied from class:
AbstractExtension
- Add this extension to the target connector. This method is protected to
allow subclasses to require a more specific type of target.
- Overrides:
extend in class Grid.AbstractGridExtension
- Parameters:
target - the connector to attach this extension to
select
public boolean select(java.lang.Object itemId)
- Description copied from interface:
Grid.SelectionModel.Single
- Marks an item as selected.
- Specified by:
select in interface Grid.SelectionModel.Single
- Parameters:
itemId - the itemId to mark as selected; null for
deselect
- Returns:
true if the selection state changed.
false if the itemId already was selected
select
protected boolean select(java.lang.Object itemId,
boolean refresh)
getSelectedRow
public java.lang.Object getSelectedRow()
- Description copied from interface:
Grid.SelectionModel.Single
- Gets the item id of the currently selected item.
- Specified by:
getSelectedRow in interface Grid.SelectionModel.Single
- Returns:
- the item id of the currently selected item, or
null if nothing is selected
reset
public void reset()
- Resets the selection state.
If an item is selected, it will become deselected.
- Specified by:
reset in interface Grid.SelectionModel
setDeselectAllowed
public void setDeselectAllowed(boolean deselectAllowed)
- Description copied from interface:
Grid.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 Grid.SelectionModel.Single
- 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:
Grid.SelectionModel.Single
- Sets whether it's allowed to deselect the selected row through
the UI.
- Specified by:
isDeselectAllowed in interface Grid.SelectionModel.Single
- Returns:
true if deselection is allowed; otherwise
false
getState
protected com.vaadin.shared.ui.grid.selection.SingleSelectionModelState getState()
- Description copied from class:
AbstractClientConnector
- Returns the shared state for this connector. The shared state object is
shared between the server connector and the client connector. Changes are
only communicated from the server to the client and not in the other
direction.
As a side effect, marks the connector dirty so any changes done to the
state will be sent to the client. Use getState(false) to avoid
marking the connector as dirty.
- Overrides:
getState in class AbstractClientConnector
- Returns:
- The shared state for this connector. Never null.
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.