public class

ButtonCell

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.ButtonCell

Class Overview

A Cell used to render a button.

Summary

Public Constructors
ButtonCell()
Construct a new ButtonCell that will use a SimpleSafeHtmlRenderer.
ButtonCell(SafeHtmlRenderer<String> renderer)
Construct a new ButtonCell 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.

void render(Cell.Context context, SafeHtml data, SafeHtmlBuilder sb)
Render the cell contents after they have been converted to SafeHtml form.
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.
[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 ButtonCell ()

Construct a new ButtonCell that will use a SimpleSafeHtmlRenderer.

public ButtonCell (SafeHtmlRenderer<String> renderer)

Construct a new ButtonCell 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

public void render (Cell.Context context, SafeHtml data, SafeHtmlBuilder sb)

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

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

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