GWT 2.7.0

com.google.gwt.cell.client
Class NumberCell

java.lang.Object
  extended by com.google.gwt.cell.client.AbstractCell<java.lang.Number>
      extended by com.google.gwt.cell.client.NumberCell
All Implemented Interfaces:
Cell<java.lang.Number>

public class NumberCell
extends AbstractCell<java.lang.Number>

A Cell used to render formatted numbers.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
 
Constructor Summary
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(NumberFormat format, SafeHtmlRenderer<java.lang.String> renderer)
          Construct a new NumberCell using the given NumberFormat and a SafeHtmlRenderer.
NumberCell(SafeHtmlRenderer<java.lang.String> renderer)
          Construct a new NumberCell using decimal format and the given SafeHtmlRenderer.
 
Method Summary
 void render(Cell.Context context, java.lang.Number 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

NumberCell

public NumberCell()
Construct a new NumberCell using decimal format and a SimpleSafeHtmlRenderer.


NumberCell

public NumberCell(NumberFormat format)
Construct a new NumberCell using the given NumberFormat and a SimpleSafeHtmlRenderer.

Parameters:
format - the NumberFormat used to render the number

NumberCell

public NumberCell(SafeHtmlRenderer<java.lang.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

NumberCell

public NumberCell(NumberFormat format,
                  SafeHtmlRenderer<java.lang.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
Method Detail

render

public void render(Cell.Context context,
                   java.lang.Number 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.lang.Number>
Specified by:
render in class AbstractCell<java.lang.Number>
Parameters:
context - the Cell.Context of the cell
value - the cell value to be rendered
sb - the SafeHtmlBuilder to be written to

GWT 2.7.0