com.vaadin.client.ui.grid.renderers
Class DateRenderer

java.lang.Object
  extended by com.vaadin.client.ui.grid.renderers.DateRenderer
All Implemented Interfaces:
Renderer<java.util.Date>

public class DateRenderer
extends java.lang.Object
implements Renderer<java.util.Date>

A renderer for rendering dates into cells

Since:
Author:
Vaadin Ltd

Constructor Summary
DateRenderer()
           
DateRenderer(DateTimeFormat format)
           
DateRenderer(PredefinedFormat format)
           
 
Method Summary
 DateTimeFormat getFormat()
          Gets the format of how the date is formatted.
 TimeZone getTimeZone()
          Returns the time zone of the date.
 void render(FlyweightCell cell, java.util.Date date)
          Called whenever the Grid updates a cell
 void setFormat(DateTimeFormat format)
          Sets the format used for formatting the dates.
 void setTimeZone(TimeZone timeZone)
          Sets the time zone of the the date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateRenderer

public DateRenderer()

DateRenderer

public DateRenderer(PredefinedFormat format)

DateRenderer

public DateRenderer(DateTimeFormat format)
Method Detail

render

public void render(FlyweightCell cell,
                   java.util.Date date)
Description copied from interface: Renderer
Called whenever the Grid updates a cell

Specified by:
render in interface Renderer<java.util.Date>
Parameters:
cell - The cell. Note that the cell is a flyweight and should not be stored outside of the method as it will change.
date - The column data object

getFormat

public DateTimeFormat getFormat()
Gets the format of how the date is formatted.

Returns:
the format
See Also:
GWT documentation on DateTimeFormat

setFormat

public void setFormat(DateTimeFormat format)
Sets the format used for formatting the dates.

Parameters:
format - the format to set
See Also:
GWT documentation on DateTimeFormat

getTimeZone

public TimeZone getTimeZone()
Returns the time zone of the date.

Returns:
the time zone

setTimeZone

public void setTimeZone(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


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.