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>

  A `Cell` used to render `Date`s.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell

      `Cell.Context`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DateCell()` Construct a new `DateCell` using the format `DateTimeFormat.PredefinedFormat.DATE_FULL` and a `SimpleSafeHtmlRenderer`.
    `DateCell(DateTimeFormat format)` Construct a new `DateCell` using the specified format and a `SimpleSafeHtmlRenderer`.
    `DateCell(DateTimeFormat format, SafeHtmlRenderer<java.lang.String> renderer)` Construct a new `DateCell` using the specified format and the given `SafeHtmlRenderer`.
    `DateCell(DateTimeFormat format, SafeHtmlRenderer<java.lang.String> renderer, TimeZone timeZone)` Construct a new `DateCell` using the specified format, the given `SafeHtmlRenderer`, and the specified time zone.
    `DateCell(DateTimeFormat format, TimeZone timeZone)` Construct a new `DateCell` using the specified format and time zone.
    `DateCell(SafeHtmlRenderer<java.lang.String> renderer)` Construct a new `DateCell` using the format `DateTimeFormat.PredefinedFormat.DATE_FULL` and a `SimpleSafeHtmlRenderer`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `render(Cell.Context context, java.util.Date value, SafeHtmlBuilder sb)` Render a cell as HTML into a `SafeHtmlBuilder`, suitable for passing to `Element.setInnerHTML(String)` on a container element.

    - ### Methods inherited from class com.google.gwt.cell.client.AbstractCell

      `dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, onBrowserEvent, onEnterKeyDown, resetFocus, setValue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DateCell

          public DateCell()

      Construct a new `DateCell` using the format `DateTimeFormat.PredefinedFormat.DATE_FULL` and a `SimpleSafeHtmlRenderer`.

    - #### DateCell

          public DateCell(SafeHtmlRenderer<java.lang.String> renderer)

      Construct a new `DateCell` using the format `DateTimeFormat.PredefinedFormat.DATE_FULL` and a `SimpleSafeHtmlRenderer`.
      Parameters:
        `renderer` - a non-null `SafeHtmlRenderer` used to render the formatted date as HTML

    - #### DateCell

          public DateCell(DateTimeFormat format)

      Construct a new `DateCell` using the specified format and a `SimpleSafeHtmlRenderer`.
      Parameters:
        `format` - the `DateTimeFormat` used to render the date

    - #### DateCell

          public DateCell(DateTimeFormat format,
                          SafeHtmlRenderer<java.lang.String> renderer)

      Construct a new `DateCell` using the specified format and the given `SafeHtmlRenderer`.
      Parameters:
        `format` - the `DateTimeFormat` used to render the date
        `renderer` - a non-null `SafeHtmlRenderer` used to render the formatted date

    - #### DateCell

          public DateCell(DateTimeFormat format,
                          TimeZone timeZone)

      Construct a new `DateCell` using the specified format and time zone.
      Parameters:
        `format` - the `DateTimeFormat` used to render the date
        `timeZone` - the `TimeZone` used to render the date, or null to use the default behavior for the local time zone and the rendered date. See `DateTimeFormat.format(Date)` and `Date.getTimezoneOffset()`

    - #### DateCell

          public DateCell(DateTimeFormat format,
                          SafeHtmlRenderer<java.lang.String> renderer,
                          TimeZone timeZone)

      Construct a new `DateCell` using the specified format, the given `SafeHtmlRenderer`, and the specified time zone.
      Parameters:
        `format` - the `DateTimeFormat` used to render the date
        `renderer` - a non-null `SafeHtmlRenderer` used to render the formatted date
        `timeZone` - the `TimeZone` used to render the date, or null to use the default behavior for the local time zone and the rendered date. See `DateTimeFormat.format(Date)` and `Date.getTimezoneOffset()`

  - ### Method Detail

    - #### render

          public void render(Cell.Context context,
                             java.util.Date value,
                             SafeHtmlBuilder sb)

      Description copied from interface: `Cell`
      Render a cell as HTML into a `SafeHtmlBuilder`, suitable for passing to `Element.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:
        `render` in interface `Cell<java.util.Date>`
      Specified by:
        `render` in class `AbstractCell<java.util.Date>`
      Parameters:
        `context` - the `Cell.Context` of the cell
        `value` - the cell value to be rendered
        `sb` - the `SafeHtmlBuilder` to be written to