T - the type this renderer knows how to presentpublic abstract static class Grid.AbstractRenderer<T> extends Grid.AbstractGridExtension implements Renderer<T>
Grid renderers. This class
currently extends the AbstractExtension superclass, but this fact should
be regarded as an implementation detail and subject to change in a future
major or minor Vaadin revision.ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRenderer(Class<T> presentationType) |
protected |
AbstractRenderer(Class<T> presentationType,
String nullRepresentation) |
| Modifier and Type | Method and Description |
|---|---|
elemental.json.JsonValue |
encode(T value)
Encodes the given value into a
JsonValue. |
protected <U> elemental.json.JsonValue |
encode(U value,
Class<U> type)
Encodes the given value to JSON.
|
static <T> elemental.json.JsonValue |
encodeValue(Object modelValue,
Renderer<T> renderer,
Converter<?,?> converter,
Locale locale)
Converts and encodes the given data model property value using the
given converter and renderer.
|
protected void |
extend(AbstractClientConnector target)
Deprecated.
|
protected String |
getNullRepresentation()
Null representation for the renderer
|
Class<T> |
getPresentationType()
Returns the class literal corresponding to the presentation type T.
|
protected Class<Grid> |
getSupportedParentType()
Deprecated.
|
addComponentToGrid, getColumn, getItemId, getParentGrid, refreshRow, remove, removeComponentFromGridgetParent, 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, setResourceclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorId@Deprecated protected Class<Grid> getSupportedParentType()
getSupportedParentType in class AbstractExtension@Deprecated protected void extend(AbstractClientConnector target)
extend in class Grid.AbstractGridExtensiontarget - the connector to attach this extension topublic Class<T> getPresentationType()
RenderergetPresentationType in interface Renderer<T>public elemental.json.JsonValue encode(T value)
RendererJsonValue.protected String getNullRepresentation()
nullprotected <U> elemental.json.JsonValue encode(U value,
Class<U> type)
This is a helper method that can be invoked by an
encode(T) override if serializing a value of
type other than the presentation type
is desired. For instance, a Renderer<Date> could first turn a
date value into a formatted string and return
encode(dateString, String.class).
value - the value to be encodedtype - the type of the valuepublic static <T> elemental.json.JsonValue encodeValue(Object modelValue, Renderer<T> renderer, Converter<?,?> converter, Locale locale)
renderer - the renderer to useconverter - the converter to usemodelValue - the value to convert and encodelocale - the locale to use in conversionCopyright © 2016 Vaadin Ltd. All rights reserved.