public class

ClickableTextCell

extends AbstractSafeHtmlCell<C>
java.lang.Object
   ↳ com.google.gwt.cell.client.AbstractCell<C>
     ↳ com.google.gwt.cell.client.AbstractSafeHtmlCell<C>
       ↳ com.google.gwt.cell.client.ClickableTextCell

Class Overview

A Cell used to render text. Clicking on the cell causes its ValueUpdater to be called.

Summary

Public Constructors
ClickableTextCell()
Construct a new ClickableTextCell that will use a SimpleSafeHtmlRenderer.
ClickableTextCell(SafeHtmlRenderer<String> renderer)
Construct a new ClickableTextCell that will use a given SafeHtmlRenderer.
Public Methods
void onBrowserEvent(Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater)
Handle a browser event that took place within the cell.

If you override this method to add support for events, remember to pass the event types that the cell expects into the constructor.

Protected Methods
void onEnterKeyDown(Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater)
Called when the user triggers a keydown event with the ENTER key while focused on the cell.
void render(Cell.Context context, SafeHtml value, SafeHtmlBuilder sb)
Render the cell contents after they have been converted to SafeHtml form.
[Expand]
Inherited Methods
From class com.google.gwt.cell.client.AbstractSafeHtmlCell
From class com.google.gwt.cell.client.AbstractCell
From class java.lang.Object
From interface com.google.gwt.cell.client.Cell

Public Constructors

public ClickableTextCell ()

Construct a new ClickableTextCell that will use a SimpleSafeHtmlRenderer.

public ClickableTextCell (SafeHtmlRenderer<String> renderer)

Construct a new ClickableTextCell that will use a given SafeHtmlRenderer.

Parameters
renderer a SafeHtmlRenderer instance

Public Methods

public void onBrowserEvent (Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater)

Handle a browser event that took place within the cell. The default implementation returns null.

If you override this method to add support for events, remember to pass the event types that the cell expects into the constructor.

Parameters
context the Context of the cell
parent the parent Element
value the value associated with the cell
event the native browser event
valueUpdater a ValueUpdater, or null if not specified

Protected Methods

protected void onEnterKeyDown (Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater)

Called when the user triggers a keydown event with the ENTER key while focused on the cell. If your cell interacts with the user, you should override this method to provide a consistent user experience. Your widget must consume keydown events for this method to be called.

Parameters
context the Context of the cell
parent the parent Element
value the value associated with the cell
event the native browser event
valueUpdater a ValueUpdater, or null if not specified

protected void render (Cell.Context context, SafeHtml value, SafeHtmlBuilder sb)

Render the cell contents after they have been converted to SafeHtml form.

Parameters
context the original context to render
value a SafeHtml string
sb the SafeHtmlBuilder to be written to