public class NumberRenderer extends AbstractRenderer<Object,Number>
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener| Constructor and Description |
|---|
NumberRenderer()
Creates a new number renderer.
|
NumberRenderer(Locale locale)
Creates a new number renderer.
|
NumberRenderer(NumberFormat numberFormat)
Creates a new number renderer.
|
NumberRenderer(NumberFormat numberFormat,
String nullRepresentation)
Creates a new number renderer.
|
NumberRenderer(String formatString)
Creates a new number renderer.
|
NumberRenderer(String formatString,
Locale locale)
Creates a new number renderer.
|
NumberRenderer(String formatString,
Locale locale,
String nullRepresentation)
Creates a new number renderer.
|
| Modifier and Type | Method and Description |
|---|---|
JsonValue |
encode(Number value)
Encodes the given value into a
JsonValue. |
String |
getNullRepresentation()
Null representation for the renderer.
|
protected NumberRendererState |
getState()
Returns the shared state for this connector.
|
protected NumberRendererState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
String |
toString() |
encode, extend, getParent, getParentGrid, getPresentationType, getSupportedParentTyperemove, setParentaddAttachListener, 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, updateDiffstateclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdpublic NumberRenderer()
public NumberRenderer(NumberFormat numberFormat)
numberFormat - the number format with which to display numbersIllegalArgumentException - if numberFormat is nullpublic NumberRenderer(NumberFormat numberFormat, String nullRepresentation) throws IllegalArgumentException
numberFormat - the number format with which to display numbersnullRepresentation - the textual representation of null valueIllegalArgumentException - if numberFormat is nullpublic NumberRenderer(Locale locale) throws IllegalArgumentException
locale - the locale in which to display numbersIllegalArgumentException - if locale is nullpublic NumberRenderer(String formatString, Locale locale) throws IllegalArgumentException
formatString - the format string with which to format the numberlocale - the locale in which to display numbersIllegalArgumentException - if locale is nullpublic NumberRenderer(String formatString) throws IllegalArgumentException
formatString - the format string with which to format the numberIllegalArgumentException - if formatString is nullpublic NumberRenderer(String formatString, Locale locale, String nullRepresentation)
formatString - the format string with which to format the numberlocale - the locale in which to present numbersIllegalArgumentException - if either argument is nullpublic JsonValue encode(Number value)
RendererJsonValue.public String getNullRepresentation()
AbstractRenderergetNullRepresentation in class AbstractRenderer<Object,Number>nullprotected NumberRendererState 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,Number>protected NumberRendererState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractRenderer<Object,Number>markAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()Copyright © 2020 Vaadin Ltd. All rights reserved.