Package com.vaadin.ui
Class Grid.AbstractGridExtension
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- com.vaadin.ui.Grid.AbstractGridExtension
-
- All Implemented Interfaces:
MethodEventSource
,ClientConnector
,Extension
,Connector
,Serializable
- Direct Known Subclasses:
Grid.AbstractRenderer
,Grid.AbstractSelectionModel
,Grid.DetailComponentManager
- Enclosing class:
- Grid
public abstract static class Grid.AbstractGridExtension extends AbstractExtension
An abstract base class for server-side Grid extensions.Note: If the extension is an instance of
DataGenerator
it will automatically register itself toRpcDataProviderExtension
of extended Grid. On remove this registration is automatically removed.- Since:
- 7.5
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
-
Constructor Summary
Constructors Constructor Description AbstractGridExtension()
Constructs a new Grid extension.AbstractGridExtension(Grid grid)
Constructs a new Grid extension and extends given Grid.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class com.vaadin.server.AbstractExtension
getParent, getSupportedParentType, setParent
-
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, 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, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
-
-
-
Constructor Detail
-
AbstractGridExtension
public AbstractGridExtension()
Constructs a new Grid extension.
-
AbstractGridExtension
public AbstractGridExtension(Grid grid)
Constructs a new Grid extension and extends given Grid.- Parameters:
grid
- a grid instance
-
-
Method Detail
-
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 classAbstractExtension
- Parameters:
target
- the connector to attach this extension to
-
remove
public void remove()
Description copied from interface:Extension
Remove this extension from its target. After an extension has been removed, it cannot be attached again.- Specified by:
remove
in interfaceExtension
- Overrides:
remove
in classAbstractExtension
-
getItemId
protected Object getItemId(String rowKey)
Gets the item id for a row key.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.
- Parameters:
rowKey
- the row key for which to retrieve an item id- Returns:
- the item id corresponding to
key
-
getColumn
protected Grid.Column getColumn(String columnId)
Gets the column for a column id.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.
- Parameters:
columnId
- the column id for which to retrieve a column- Returns:
- the column corresponding to
columnId
-
getParentGrid
protected Grid getParentGrid()
Gets the parent Grid of the renderer.- Returns:
- parent grid
- Throws:
IllegalStateException
- if parent is not Grid
-
refreshRow
protected void refreshRow(Object itemId)
Resends the row data for given item id to the client.- Parameters:
itemId
- row to refresh- Since:
- 7.6
-
addComponentToGrid
protected void addComponentToGrid(Component c)
Informs the parent Grid that this Extension wants to add a child component to it.- Parameters:
c
- component- Since:
- 7.6
-
removeComponentFromGrid
protected void removeComponentFromGrid(Component c)
Informs the parent Grid that this Extension wants to remove a child component from it.- Parameters:
c
- component- Since:
- 7.6
-
-