public class TextRenderer extends AbstractRenderer<Object,Object>
Object.toString()
is used for determining the text to show.ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Constructor and Description |
---|
TextRenderer()
Creates a new text renderer that uses
"" to represent null
values. |
TextRenderer(String nullRepresentation)
Creates a new text renderer with the given string to represent null
values.
|
Modifier and Type | Method and Description |
---|---|
JsonValue |
encode(Object value)
Encodes the given value into a
JsonValue . |
String |
getNullRepresentation()
Null representation for the renderer.
|
protected TextRendererState |
getState()
Returns the shared state for this connector.
|
protected TextRendererState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
encode, extend, getParent, getParentGrid, getPresentationType, getSupportedParentType
remove, setParent
addAttachListener, addDetachListener, addExtension, 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, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
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 TextRenderer()
""
to represent null
values.public TextRenderer(String nullRepresentation)
nullRepresentation
- the textual representation of null
valuepublic JsonValue encode(Object value)
Renderer
JsonValue
.public String getNullRepresentation()
AbstractRenderer
getNullRepresentation
in class AbstractRenderer<Object,Object>
null
protected TextRendererState 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<Object,Object>
protected TextRendererState getState(boolean markAsDirty)
AbstractClientConnector
getState
in class AbstractRenderer<Object,Object>
markAsDirty
- true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()
Copyright © 2018 Vaadin Ltd. All rights reserved.