public class DateRenderer extends AbstractRenderer<Object,Date>
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener| Constructor and Description |
|---|
DateRenderer()
Creates a new date renderer.
|
DateRenderer(DateFormat dateFormat)
Creates a new date renderer.
|
DateRenderer(DateFormat dateFormat,
String nullRepresentation)
Creates a new date renderer.
|
DateRenderer(Locale locale)
Creates a new date renderer.
|
DateRenderer(Locale locale,
String nullRepresentation)
Creates a new date renderer.
|
DateRenderer(String formatString)
Creates a new date renderer.
|
DateRenderer(String formatString,
Locale locale)
Creates a new date renderer.
|
DateRenderer(String formatString,
Locale locale,
String nullRepresentation)
Creates a new date renderer.
|
DateRenderer(String formatString,
String nullRepresentation)
Creates a new date renderer.
|
| Modifier and Type | Method and Description |
|---|---|
JsonValue |
encode(Date value)
Encodes the given value into a
JsonValue. |
String |
getNullRepresentation()
Null representation for the renderer.
|
protected DateRendererState |
getState()
Returns the shared state for this connector.
|
protected DateRendererState |
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 DateRenderer()
The renderer is configured to render with the Date.toString()
representation for the default locale.
public DateRenderer(Locale locale) throws IllegalArgumentException
The renderer is configured to render with the Date.toString()
representation for the given locale.
locale - the locale in which to present datesIllegalArgumentException - if locale is nullpublic DateRenderer(Locale locale, String nullRepresentation) throws IllegalArgumentException
The renderer is configured to render with the Date.toString()
representation for the given locale.
locale - the locale in which to present datesnullRepresentation - the textual representation of null valueIllegalArgumentException - if locale is nullpublic DateRenderer(String formatString) throws IllegalArgumentException
The renderer is configured to render with the given string format, as displayed in the default locale.
formatString - the format string with which to format the dateIllegalArgumentException - if formatString is nullpublic DateRenderer(String formatString, String nullRepresentation) throws IllegalArgumentException
The renderer is configured to render with the given string format, as displayed in the default locale.
formatString - the format string with which to format the datenullRepresentation - the textual representation of null valueIllegalArgumentException - if formatString is nullpublic DateRenderer(String formatString, Locale locale) throws IllegalArgumentException
The renderer is configured to render with the given string format, as displayed in the given locale.
formatString - the format string to format the date withlocale - the locale to useIllegalArgumentException - if either argument is nullpublic DateRenderer(String formatString, Locale locale, String nullRepresentation) throws IllegalArgumentException
The renderer is configured to render with the given string format, as displayed in the given locale.
formatString - the format string to format the date withlocale - the locale to usenullRepresentation - the textual representation of null valueIllegalArgumentException - if either argument is nullpublic DateRenderer(DateFormat dateFormat) throws IllegalArgumentException
The renderer is configured to render with he given date format.
dateFormat - the date format to use when rendering datesIllegalArgumentException - if dateFormat is nullpublic DateRenderer(DateFormat dateFormat, String nullRepresentation) throws IllegalArgumentException
The renderer is configured to render with he given date format.
dateFormat - the date format to use when rendering datesIllegalArgumentException - if dateFormat is nullpublic String getNullRepresentation()
AbstractRenderergetNullRepresentation in class AbstractRenderer<Object,Date>nullpublic JsonValue encode(Date value)
RendererJsonValue.protected DateRendererState 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,Date>protected DateRendererState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractRenderer<Object,Date>markAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()Copyright © 2019 Vaadin Ltd. All rights reserved.