@Deprecated public abstract static class Grid.AbstractSelectionModel extends Grid.AbstractGridExtension implements Grid.SelectionModel, DataGenerator
Grid.SelectionModel.HasUserSelectionAllowed, Grid.SelectionModel.Multi, Grid.SelectionModel.None, Grid.SelectionModel.SingleClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener| Modifier and Type | Field and Description |
|---|---|
protected LinkedHashSet<Object> |
selection
Deprecated.
|
| Constructor and Description |
|---|
AbstractSelectionModel()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkItemIdExists(Object itemId)
Deprecated.
Sanity check for existence of item id.
|
protected void |
checkItemIdsExist(Collection<?> itemIds)
Deprecated.
Sanity check for existence of item ids in given collection.
|
void |
destroyData(Object itemId)
Deprecated.
Informs the DataGenerator that an item id has been dropped and is no
longer needed.
|
protected void |
fireSelectionEvent(Collection<Object> oldSelection,
Collection<Object> newSelection)
Deprecated.
Fires a
SelectionEvent to all the SelectionListeners currently added to the Grid in which this
SelectionModel is. |
void |
generateData(Object itemId,
Item item,
elemental.json.JsonObject rowData)
Deprecated.
Adds data to row object for given item and item id being sent to client.
|
protected Object |
getItemId(String rowKey)
Deprecated.
Gets the item id for a row key.
|
Collection<Object> |
getSelectedRows()
Deprecated.
Returns a collection of all the currently selected itemIds.
|
boolean |
isSelected(Object itemId)
Deprecated.
Checks whether an item is selected or not.
|
void |
setGrid(Grid grid)
Deprecated.
Injects the current
Grid instance into the SelectionModel. |
addComponentToGrid, extend, getColumn, getParentGrid, refreshRow, remove, removeComponentFromGridgetParent, getSupportedParentType, setParentaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, 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, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitresetaddAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerprotected final LinkedHashSet<Object> selection
public boolean isSelected(Object itemId)
Grid.SelectionModelisSelected in interface Grid.SelectionModelitemId - the item id to check fortrue if the item is selectedpublic Collection<Object> getSelectedRows()
Grid.SelectionModelgetSelectedRows in interface Grid.SelectionModelpublic void setGrid(Grid grid)
Grid.SelectionModelGrid instance into the SelectionModel.
This method should usually call the extend method of
AbstractExtension.
Note: This method should not be called manually.
setGrid in interface Grid.SelectionModelgrid - the Grid in which the SelectionModel currently is, or
null when a selection model is being detached
from a Grid.protected void checkItemIdExists(Object itemId) throws IllegalArgumentException
itemId - item id to be selected / deselectedIllegalArgumentException - if item Id doesn't exist in the container of Gridprotected void checkItemIdsExist(Collection<?> itemIds) throws IllegalArgumentException
itemIds - item id collection to be selected / deselectedIllegalArgumentException - if at least one item id doesn't exist in the container of
Gridprotected void fireSelectionEvent(Collection<Object> oldSelection, Collection<Object> newSelection)
SelectionEvent to all the SelectionListeners currently added to the Grid in which this
SelectionModel is.
Note that this is only a helper method, and routes the call all the
way to Grid. A Grid.SelectionModel is not a
SelectionEvent.SelectionNotifier
oldSelection - the complete Collection of the itemIds that were
selected before this event happenednewSelection - the complete Collection of the itemIds that are
selected after this event happenedpublic void generateData(Object itemId, Item item, elemental.json.JsonObject rowData)
DataGeneratorgenerateData in interface DataGeneratoritemId - item id of itemitem - item being sent to clientrowData - row object being sent to clientpublic void destroyData(Object itemId)
DataGeneratordestroyData in interface DataGeneratoritemId - removed item idprotected Object getItemId(String rowKey)
Grid.AbstractGridExtensionA key is used to identify a particular row on both a server and a client. This method can be used to get the item id for the row key that the client has sent.
getItemId in class Grid.AbstractGridExtensionrowKey - the row key for which to retrieve an item idkeyCopyright © 2019 Vaadin Ltd. All rights reserved.