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 forCells 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 givenSafeHtmlRendererthat will consume a given set of events.AbstractSafeHtmlCell(SafeHtmlRenderer<C> renderer, java.util.Set<java.lang.String> consumedEvents)Construct an AbstractSafeHtmlCell using a givenSafeHtmlRendererthat 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 theSafeHtmlRendererused by this cell.protected abstract voidrender(Cell.Context context, SafeHtml data, SafeHtmlBuilder sb)Render the cell contents after they have been converted toSafeHtmlform.voidrender(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 givenSafeHtmlRendererthat 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 givenSafeHtmlRendererthat will consume a given set of events.- Parameters:
renderer- a SafeHtmlRendererconsumedEvents- a Set of event names
-
-
Method Detail
-
getRenderer
public SafeHtmlRenderer<C> getRenderer()
Return theSafeHtmlRendererused by this cell.- Returns:
- a
SafeHtmlRendererinstance
-
render
public void render(Cell.Context context, C data, SafeHtmlBuilder sb)
Description copied from interface:CellRender 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:
renderin interfaceCell<C>- Specified by:
renderin classAbstractCell<C>- Parameters:
context- theCell.Contextof the celldata- the cell value to be renderedsb- theSafeHtmlBuilderto be written to
-
render
protected abstract void render(Cell.Context context, SafeHtml data, SafeHtmlBuilder sb)
Render the cell contents after they have been converted toSafeHtmlform.- Parameters:
context- the original context to renderdata- aSafeHtmlstringsb- theSafeHtmlBuilderto be written to
-
-