public class DateRenderer extends Grid.AbstractRenderer<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
|
String |
toString() |
encode, encodeValue, extend, getPresentationType, getSupportedParentType
addComponentToGrid, getColumn, getItemId, getParentGrid, refreshRow, remove, removeComponentFromGrid
getParent, setParent
addAttachListener, 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, setResource
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public 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 null
public String getNullRepresentation()
Grid.AbstractRenderer
getNullRepresentation
in class Grid.AbstractRenderer<Date>
null
public JsonValue encode(Date value)
Renderer
JsonValue
.Copyright © 2019 Vaadin Ltd. All rights reserved.