Package com.google.gwt.cell.client
Class AbstractSafeHtmlCell<C>
- java.lang.Object
-
- com.google.gwt.cell.client.AbstractCell<C>
-
- com.google.gwt.cell.client.AbstractSafeHtmlCell<C>
-
- Type Parameters:
C
- the type that this Cell represents
- All Implemented Interfaces:
Cell<C>
- Direct Known Subclasses:
ButtonCell
,ClickableTextCell
,TextCell
public abstract class AbstractSafeHtmlCell<C> extends AbstractCell<C>
A superclass forCell
s that render or escape a String argument as HTML.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
-
-
Constructor Summary
Constructors Constructor Description AbstractSafeHtmlCell(SafeHtmlRenderer<C> renderer, java.lang.String... consumedEvents)
Construct an AbstractSafeHtmlCell using a givenSafeHtmlRenderer
that will consume a given set of events.AbstractSafeHtmlCell(SafeHtmlRenderer<C> renderer, java.util.Set<java.lang.String> consumedEvents)
Construct an AbstractSafeHtmlCell using a givenSafeHtmlRenderer
that will consume a given set of events.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SafeHtmlRenderer<C>
getRenderer()
Return theSafeHtmlRenderer
used by this cell.protected abstract void
render(Cell.Context context, SafeHtml data, SafeHtmlBuilder sb)
Render the cell contents after they have been converted toSafeHtml
form.void
render(Cell.Context context, C data, SafeHtmlBuilder sb)
Render a cell as HTML into aSafeHtmlBuilder
, suitable for passing toElement.setInnerHTML(String)
on a container element.-
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, onBrowserEvent, onEnterKeyDown, resetFocus, setValue
-
-
-
-
Constructor Detail
-
AbstractSafeHtmlCell
public AbstractSafeHtmlCell(SafeHtmlRenderer<C> renderer, java.lang.String... consumedEvents)
Construct an AbstractSafeHtmlCell using a givenSafeHtmlRenderer
that will consume a given set of events.- Parameters:
renderer
- a SafeHtmlRendererconsumedEvents
- a varargs list of event names
-
AbstractSafeHtmlCell
public AbstractSafeHtmlCell(SafeHtmlRenderer<C> renderer, java.util.Set<java.lang.String> consumedEvents)
Construct an AbstractSafeHtmlCell using a givenSafeHtmlRenderer
that will consume a given set of events.- Parameters:
renderer
- a SafeHtmlRendererconsumedEvents
- a Set of event names
-
-
Method Detail
-
getRenderer
public SafeHtmlRenderer<C> getRenderer()
Return theSafeHtmlRenderer
used by this cell.- Returns:
- a
SafeHtmlRenderer
instance
-
render
public void render(Cell.Context context, C data, SafeHtmlBuilder sb)
Description copied from interface:Cell
Render a cell as HTML into aSafeHtmlBuilder
, suitable for passing toElement.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 interfaceCell<C>
- Specified by:
render
in classAbstractCell<C>
- Parameters:
context
- theCell.Context
of the celldata
- the cell value to be renderedsb
- theSafeHtmlBuilder
to be written to
-
render
protected abstract void render(Cell.Context context, SafeHtml data, SafeHtmlBuilder sb)
Render the cell contents after they have been converted toSafeHtml
form.- Parameters:
context
- the original context to renderdata
- aSafeHtml
stringsb
- theSafeHtmlBuilder
to be written to
-
-