public class ImageCell extends AbstractCell<String>
An AbstractCell
used to render an image. The String value is the url
of the image.
If the images being displayed are static or available at compile time, using
ImageResourceCell
will usually be more efficient.
ImageResourceCell
Cell.Context
Constructor and Description |
---|
ImageCell()
Construct a new ImageCell.
|
Modifier and Type | Method and Description |
---|---|
void |
render(Cell.Context context,
String 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 void render(Cell.Context context, String 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<String>
render
in class AbstractCell<String>
context
- the Cell.Context
of the cellvalue
- the cell value to be renderedsb
- the SafeHtmlBuilder
to be written toCopyright © 2018. All rights reserved.