com.google.gwt.cell.client
Class ClickableTextCell

java.lang.Object
  extended by com.google.gwt.cell.client.AbstractCell<java.lang.String>
      extended by com.google.gwt.cell.client.ClickableTextCell
All Implemented Interfaces:
Cell<java.lang.String>

public class ClickableTextCell
extends AbstractCell<java.lang.String>

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

Note: This class is new and its interface subject to change.


Constructor Summary
ClickableTextCell()
           
 
Method Summary
 boolean consumesEvents()
          Returns true if the cell is interested in browser events.
 java.lang.Object onBrowserEvent(Element parent, java.lang.String value, java.lang.Object viewData, NativeEvent event, ValueUpdater<java.lang.String> valueUpdater)
          Handle a browser event that took place within the cell.
 void render(java.lang.String value, java.lang.Object viewData, java.lang.StringBuilder sb)
          Render a cell as HTML into a StringBuilder, suitable for passing to Element.setInnerHTML(java.lang.String) on a container element.
 
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClickableTextCell

public ClickableTextCell()
Method Detail

consumesEvents

public boolean consumesEvents()
Description copied from interface: Cell
Returns true if the cell is interested in browser events. The default implementation returns false.

Specified by:
consumesEvents in interface Cell<java.lang.String>
Overrides:
consumesEvents in class AbstractCell<java.lang.String>

onBrowserEvent

public java.lang.Object onBrowserEvent(Element parent,
                                       java.lang.String value,
                                       java.lang.Object viewData,
                                       NativeEvent event,
                                       ValueUpdater<java.lang.String> valueUpdater)
Description copied from interface: Cell
Handle a browser event that took place within the cell. The default implementation returns null.

Specified by:
onBrowserEvent in interface Cell<java.lang.String>
Overrides:
onBrowserEvent in class AbstractCell<java.lang.String>
Parameters:
parent - the parent Element
value - the value associated with the cell
viewData - the view data associated with the cell, or null
event - the native browser event
valueUpdater - a ValueUpdater, or null
Returns:
a view data object which may be the one passed in or a new object

render

public void render(java.lang.String value,
                   java.lang.Object viewData,
                   java.lang.StringBuilder sb)
Description copied from interface: Cell
Render a cell as HTML into a StringBuilder, suitable for passing to Element.setInnerHTML(java.lang.String) on a container element.

Specified by:
render in interface Cell<java.lang.String>
Specified by:
render in class AbstractCell<java.lang.String>
Parameters:
value - the cell value to be rendered
viewData - view data associated with the cell
sb - the StringBuilder to be written to