Package com.vaadin.client.renderers
Class DateRenderer
- java.lang.Object
-
- com.vaadin.client.renderers.DateRenderer
-
-
Constructor Summary
Constructors Constructor Description DateRenderer()Constructs a renderer for displaying date data.DateRenderer(com.google.gwt.i18n.shared.DateTimeFormat format)Constructs a renderer for displaying date data.DateRenderer(com.google.gwt.i18n.shared.DateTimeFormat.PredefinedFormat format)Constructs a renderer for displaying date data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.i18n.shared.DateTimeFormatgetFormat()Gets the format of how the date is formatted.com.google.gwt.i18n.client.TimeZonegetTimeZone()Returns the time zone of the date.voidrender(RendererCellReference cell, Date date)Called whenever theGridupdates a cell.voidsetFormat(com.google.gwt.i18n.shared.DateTimeFormat format)Sets the format used for formatting the dates.voidsetTimeZone(com.google.gwt.i18n.client.TimeZone timeZone)Sets the time zone of the the date.
-
-
-
Constructor Detail
-
DateRenderer
public DateRenderer()
Constructs a renderer for displaying date data.
-
DateRenderer
public DateRenderer(com.google.gwt.i18n.shared.DateTimeFormat.PredefinedFormat format)
Constructs a renderer for displaying date data.- Parameters:
format- the required display format
-
DateRenderer
public DateRenderer(com.google.gwt.i18n.shared.DateTimeFormat format)
Constructs a renderer for displaying date data.- Parameters:
format- the required display format
-
-
Method Detail
-
render
public void render(RendererCellReference cell, Date date)
Description copied from interface:RendererCalled whenever theGridupdates a cell.For optimal performance, work done in this method should be kept to a minimum since it will be called continuously while the user is scrolling. It is recommended to set up the cell's DOM structure in
ComplexRenderer.init(RendererCellReference)and only make incremental updates based on cell data in this method.
-
getFormat
public com.google.gwt.i18n.shared.DateTimeFormat getFormat()
Gets the format of how the date is formatted.- Returns:
- the format
- See Also:
- GWT documentation on DateTimeFormat
-
setFormat
public void setFormat(com.google.gwt.i18n.shared.DateTimeFormat format)
Sets the format used for formatting the dates.- Parameters:
format- the format to set- See Also:
- GWT documentation on DateTimeFormat
-
getTimeZone
public com.google.gwt.i18n.client.TimeZone getTimeZone()
Returns the time zone of the date.- Returns:
- the time zone
-
setTimeZone
public void setTimeZone(com.google.gwt.i18n.client.TimeZone timeZone)
Sets the time zone of the the date. By default uses the time zone of the browser.- Parameters:
timeZone- the timeZone to set
-
-