com.vaadin.ui.renderers.
Class DateRenderer
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.server.AbstractExtension
-
- com.vaadin.ui.Grid.AbstractGridExtension
-
- com.vaadin.ui.Grid.AbstractRenderer<Date>
-
- com.vaadin.ui.renderers.DateRenderer
-
All Implemented Interfaces:
MethodEventSource, ClientConnector, Extension, Connector, Renderer<Date>, Serializable
public class DateRenderer extends Grid.AbstractRenderer<Date>
A renderer for presenting date values.
Since:
7.4
Author:
Vaadin Ltd
See Also:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
-
Constructor Summary
Constructors 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.
-
Method Summary
All Methods 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()
-
Methods inherited from class com.vaadin.ui.Grid.AbstractRenderer
encode, encodeValue, extend, getPresentationType, getSupportedParentType
-
Methods inherited from class com.vaadin.ui.Grid.AbstractGridExtension
addComponentToGrid, getColumn, getItemId, getParentGrid, refreshRow, remove, removeComponentFromGrid
-
Methods inherited from class com.vaadin.server.AbstractExtension
getParent, setParent
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
-
-
-
Constructor Detail
-
DateRenderer
public DateRenderer()
Creates a new date renderer.
The renderer is configured to render with the
Date.toString()
representation for the default locale.
-
DateRenderer
public DateRenderer(Locale locale) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with the
Date.toString()
representation for the given locale.Parameters:
locale
- the locale in which to present datesThrows:
IllegalArgumentException
- iflocale
isnull
-
DateRenderer
public DateRenderer(Locale locale, String nullRepresentation) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with the
Date.toString()
representation for the given locale.Parameters:
locale
- the locale in which to present datesnullRepresentation
- the textual representation ofnull
valueThrows:
IllegalArgumentException
- iflocale
isnull
-
DateRenderer
public DateRenderer(String formatString) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with the given string format, as displayed in the default locale.
Parameters:
formatString
- the format string with which to format the dateThrows:
IllegalArgumentException
- ifformatString
isnull
See Also:
-
DateRenderer
public DateRenderer(String formatString, String nullRepresentation) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with the given string format, as displayed in the default locale.
Parameters:
formatString
- the format string with which to format the datenullRepresentation
- the textual representation ofnull
valueThrows:
IllegalArgumentException
- ifformatString
isnull
See Also:
-
DateRenderer
public DateRenderer(String formatString, Locale locale) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with the given string format, as displayed in the given locale.
Parameters:
formatString
- the format string to format the date withlocale
- the locale to useThrows:
IllegalArgumentException
- if either argument isnull
See Also:
-
DateRenderer
public DateRenderer(String formatString, Locale locale, String nullRepresentation) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with the given string format, as displayed in the given locale.
Parameters:
formatString
- the format string to format the date withlocale
- the locale to usenullRepresentation
- the textual representation ofnull
valueThrows:
IllegalArgumentException
- if either argument isnull
See Also:
-
DateRenderer
public DateRenderer(DateFormat dateFormat) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with he given date format.
Parameters:
dateFormat
- the date format to use when rendering datesThrows:
IllegalArgumentException
- ifdateFormat
isnull
-
DateRenderer
public DateRenderer(DateFormat dateFormat, String nullRepresentation) throws IllegalArgumentException
Creates a new date renderer.
The renderer is configured to render with he given date format.
Parameters:
dateFormat
- the date format to use when rendering datesThrows:
IllegalArgumentException
- ifdateFormat
isnull
-
-
Method Detail
-
getNullRepresentation
public String getNullRepresentation()
Description copied from class:
Grid.AbstractRenderer
Null representation for the renderer
Overrides:
getNullRepresentation
in classGrid.AbstractRenderer<Date>
Returns:
a textual representation of
null
-
encode
public JsonValue encode(Date value)
Description copied from interface:
Renderer
Encodes the given value into a
JsonValue
.
-
-