public class

NumberCell

extends AbstractCell<C>
java.lang.Object
   ↳ com.google.gwt.cell.client.AbstractCell<C>
     ↳ com.google.gwt.cell.client.NumberCell

Class Overview

A Cell used to render formatted numbers.

Summary

Public Constructors
NumberCell()
Construct a new NumberCell using decimal format and a SimpleSafeHtmlRenderer.
NumberCell(NumberFormat format)
Construct a new NumberCell using the given NumberFormat and a SimpleSafeHtmlRenderer.
NumberCell(SafeHtmlRenderer<String> renderer)
Construct a new NumberCell using decimal format and the given SafeHtmlRenderer.
NumberCell(NumberFormat format, SafeHtmlRenderer<String> renderer)
Construct a new NumberCell using the given NumberFormat and a SafeHtmlRenderer.
Public Methods
void render(Cell.Context context, Number value, SafeHtmlBuilder sb)
Render a cell as HTML into a SafeHtmlBuilder, suitable for passing to setInnerHTML(String) on a container element.
[Expand]
Inherited Methods
From class com.google.gwt.cell.client.AbstractCell
From class java.lang.Object
From interface com.google.gwt.cell.client.Cell

Public Constructors

public NumberCell ()

Construct a new NumberCell using decimal format and a SimpleSafeHtmlRenderer.

public NumberCell (NumberFormat format)

Construct a new NumberCell using the given NumberFormat and a SimpleSafeHtmlRenderer.

Parameters
format the NumberFormat used to render the number

public NumberCell (SafeHtmlRenderer<String> renderer)

Construct a new NumberCell using decimal format and the given SafeHtmlRenderer.

Parameters
renderer the SafeHtmlRenderer used to render the formatted number as HTML

public NumberCell (NumberFormat format, SafeHtmlRenderer<String> renderer)

Construct a new NumberCell using the given NumberFormat and a SafeHtmlRenderer.

Parameters
format the NumberFormat used to render the number
renderer the SafeHtmlRenderer used to render the formatted number as HTML

Public Methods

public void render (Cell.Context context, Number value, SafeHtmlBuilder sb)

Render a cell as HTML into a SafeHtmlBuilder, suitable for passing to 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.

Parameters
context the Context of the cell
value the cell value to be rendered
sb the SafeHtmlBuilder to be written to