T - the type of the parent GridV - the type presented by the rendererpublic abstract class ClickableRenderer<T,V> extends AbstractRenderer<T,V>
Renderers that render clickable items.
Click listeners can be added to a renderer to be notified when any of the
rendered items is clicked.| Modifier and Type | Class and Description |
|---|---|
static class |
ClickableRenderer.RendererClickEvent<T>
An event fired when a clickable widget rendered by a ClickableRenderer is
clicked.
|
static interface |
ClickableRenderer.RendererClickListener<T>
An interface for listening to
renderer click
events. |
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener| Modifier | Constructor and Description |
|---|---|
protected |
ClickableRenderer(Class<V> presentationType)
Creates a new clickable renderer with the given presentation type.
|
protected |
ClickableRenderer(Class<V> presentationType,
String nullRepresentation)
Creates a new clickable renderer with the given presentation type and
null representation.
|
| Modifier and Type | Method and Description |
|---|---|
Registration |
addClickListener(ClickableRenderer.RendererClickListener<T> listener)
Adds a click listener to this button renderer.
|
protected ClickableRendererState |
getState()
Returns the shared state for this connector.
|
protected ClickableRendererState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
void |
removeClickListener(ClickableRenderer.RendererClickListener<T> listener)
Deprecated.
|
encode, encode, extend, getNullRepresentation, getParent, getParentGrid, getPresentationType, getSupportedParentTyperemove, setParentaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdprotected ClickableRenderer(Class<V> presentationType)
presentationType - the data type that this renderer displays, not
nullprotected ClickableRenderer(Class<V> presentationType, String nullRepresentation)
presentationType - the data type that this renderer displays, not
nullnullRepresentation - a string that will be sent to the client instead of a regular
value in case the actual cell value is null. May
be null.public Registration addClickListener(ClickableRenderer.RendererClickListener<T> listener)
listener - the click listener to be added, not null@Deprecated public void removeClickListener(ClickableRenderer.RendererClickListener<T> listener)
listener - the click listener to be removedprotected ClickableRendererState getState()
AbstractClientConnector
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.
getState in class AbstractRenderer<T,V>protected ClickableRendererState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractRenderer<T,V>markAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()Copyright © 2021 Vaadin Ltd. All rights reserved.