public class NumberCell extends AbstractCell<Number>
Cell
used to render formatted numbers.Cell.Context
Constructor and Description |
---|
NumberCell()
Construct a new
NumberCell using decimal format and a
SimpleSafeHtmlRenderer . |
NumberCell(NumberFormat format)
|
NumberCell(NumberFormat format,
SafeHtmlRenderer<String> renderer)
|
NumberCell(SafeHtmlRenderer<String> renderer)
Construct a new
NumberCell using decimal format and the given
SafeHtmlRenderer . |
Modifier and Type | Method and Description |
---|---|
void |
render(Cell.Context context,
Number value,
SafeHtmlBuilder sb)
Render a cell as HTML into a
SafeHtmlBuilder , suitable for passing
to Element.setInnerHTML(String) on a container element. |
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, onBrowserEvent, onEnterKeyDown, resetFocus, setValue
public NumberCell()
NumberCell
using decimal format and a
SimpleSafeHtmlRenderer
.public NumberCell(NumberFormat format)
format
- the NumberFormat
used to render the numberpublic NumberCell(SafeHtmlRenderer<String> renderer)
NumberCell
using decimal format and the given
SafeHtmlRenderer
.renderer
- the SafeHtmlRenderer
used to render the formatted
number as HTMLpublic NumberCell(NumberFormat format, SafeHtmlRenderer<String> renderer)
format
- the NumberFormat
used to render the numberrenderer
- the SafeHtmlRenderer
used to render the formatted
number as HTMLpublic void render(Cell.Context context, Number value, SafeHtmlBuilder sb)
Cell
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.
render
in interface Cell<Number>
render
in class AbstractCell<Number>
context
- the Cell.Context
of the cellvalue
- the cell value to be renderedsb
- the SafeHtmlBuilder
to be written toCopyright © 2018. All rights reserved.