public abstract static class Grid.AbstractGridExtension extends AbstractExtension
Note: If the extension is an instance of DataGenerator
it will
automatically register itself to RpcDataProviderExtension
of
extended Grid. On remove this registration is automatically removed.
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Constructor and Description |
---|
AbstractGridExtension()
Constructs a new Grid extension.
|
AbstractGridExtension(Grid grid)
Constructs a new Grid extension and extends given Grid.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addComponentToGrid(Component c)
Informs the parent Grid that this Extension wants to add a child
component to it.
|
protected void |
extend(AbstractClientConnector target)
Add this extension to the target connector.
|
protected Grid.Column |
getColumn(String columnId)
Gets the column for a column id.
|
protected Object |
getItemId(String rowKey)
Gets the item id for a row key.
|
protected Grid |
getParentGrid()
Gets the parent Grid of the renderer.
|
protected void |
refreshRow(Object itemId)
Resends the row data for given item id to the client.
|
void |
remove()
Remove this extension from its target.
|
protected void |
removeComponentFromGrid(Component c)
Informs the parent Grid that this Extension wants to remove a child
component from it.
|
getParent, getSupportedParentType, setParent
addAttachListener, 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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
public AbstractGridExtension()
public AbstractGridExtension(Grid grid)
grid
- a grid instanceprotected void extend(AbstractClientConnector target)
AbstractExtension
extend
in class AbstractExtension
target
- the connector to attach this extension topublic void remove()
Extension
remove
in interface Extension
remove
in class AbstractExtension
protected Object getItemId(String rowKey)
A 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.
rowKey
- the row key for which to retrieve an item idkey
protected Grid.Column getColumn(String columnId)
An id is used to identify a particular column on both a server and a client. This method can be used to get the column for the column id that the client has sent.
columnId
- the column id for which to retrieve a columncolumnId
protected Grid getParentGrid()
IllegalStateException
- if parent is not Gridprotected void refreshRow(Object itemId)
itemId
- row to refreshprotected void addComponentToGrid(Component c)
c
- componentprotected void removeComponentFromGrid(Component c)
c
- componentCopyright © 2019 Vaadin Ltd. All rights reserved.