Package com.google.gwt.cell.client
Class DateCell
- java.lang.Object
-
- com.google.gwt.cell.client.AbstractCell<java.util.Date>
-
- com.google.gwt.cell.client.DateCell
-
- All Implemented Interfaces:
Cell<java.util.Date>
public class DateCell extends AbstractCell<java.util.Date>
ACellused to renderDates.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
-
-
Constructor Summary
Constructors Constructor Description DateCell()Construct a newDateCellusing the formatDateTimeFormat.PredefinedFormat.DATE_FULLand aSimpleSafeHtmlRenderer.DateCell(DateTimeFormat format)Construct a newDateCellusing the specified format and aSimpleSafeHtmlRenderer.DateCell(DateTimeFormat format, TimeZone timeZone)Construct a newDateCellusing the specified format and time zone.DateCell(DateTimeFormat format, SafeHtmlRenderer<java.lang.String> renderer)Construct a newDateCellusing the specified format and the givenSafeHtmlRenderer.DateCell(DateTimeFormat format, SafeHtmlRenderer<java.lang.String> renderer, TimeZone timeZone)Construct a newDateCellusing the specified format, the givenSafeHtmlRenderer, and the specified time zone.DateCell(SafeHtmlRenderer<java.lang.String> renderer)Construct a newDateCellusing the formatDateTimeFormat.PredefinedFormat.DATE_FULLand aSimpleSafeHtmlRenderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrender(Cell.Context context, java.util.Date value, SafeHtmlBuilder sb)Render a cell as HTML into aSafeHtmlBuilder, suitable for passing toElement.setInnerHTML(String)on a container element.-
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, onBrowserEvent, onEnterKeyDown, resetFocus, setValue
-
-
-
-
Constructor Detail
-
DateCell
public DateCell()
Construct a newDateCellusing the formatDateTimeFormat.PredefinedFormat.DATE_FULLand aSimpleSafeHtmlRenderer.
-
DateCell
public DateCell(SafeHtmlRenderer<java.lang.String> renderer)
Construct a newDateCellusing the formatDateTimeFormat.PredefinedFormat.DATE_FULLand aSimpleSafeHtmlRenderer.- Parameters:
renderer- a non-nullSafeHtmlRendererused to render the formatted date as HTML
-
DateCell
public DateCell(DateTimeFormat format)
Construct a newDateCellusing the specified format and aSimpleSafeHtmlRenderer.- Parameters:
format- theDateTimeFormatused to render the date
-
DateCell
public DateCell(DateTimeFormat format, SafeHtmlRenderer<java.lang.String> renderer)
Construct a newDateCellusing the specified format and the givenSafeHtmlRenderer.- Parameters:
format- theDateTimeFormatused to render the daterenderer- a non-nullSafeHtmlRendererused to render the formatted date
-
DateCell
public DateCell(DateTimeFormat format, TimeZone timeZone)
Construct a newDateCellusing the specified format and time zone.- Parameters:
format- theDateTimeFormatused to render the datetimeZone- theTimeZoneused to render the date, or null to use the default behavior for the local time zone and the rendered date. SeeDateTimeFormat.format(Date)andDate.getTimezoneOffset()
-
DateCell
public DateCell(DateTimeFormat format, SafeHtmlRenderer<java.lang.String> renderer, TimeZone timeZone)
Construct a newDateCellusing the specified format, the givenSafeHtmlRenderer, and the specified time zone.- Parameters:
format- theDateTimeFormatused to render the daterenderer- a non-nullSafeHtmlRendererused to render the formatted datetimeZone- theTimeZoneused to render the date, or null to use the default behavior for the local time zone and the rendered date. SeeDateTimeFormat.format(Date)andDate.getTimezoneOffset()
-
-
Method Detail
-
render
public void render(Cell.Context context, java.util.Date value, SafeHtmlBuilder sb)
Description copied from interface:CellRender a cell as HTML into aSafeHtmlBuilder, suitable for passing toElement.setInnerHTML(String)on a container element.Note: If your cell contains natively focusable elements, such as buttons or input elements, be sure to set the tabIndex to -1 so that they do not steal focus away from the containing widget.
- Specified by:
renderin interfaceCell<java.util.Date>- Specified by:
renderin classAbstractCell<java.util.Date>- Parameters:
context- theCell.Contextof the cellvalue- the cell value to be renderedsb- theSafeHtmlBuilderto be written to
-
-