com.google.gwt.cell.client
Class SelectionCell

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

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

A Cell used to render a drop-down list.

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


Constructor Summary
SelectionCell(java.util.List<java.lang.String> options)
          Contruct a new SelectionCell with the specified options.
 
Method Summary
 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
consumesEvents, dependsOnSelection, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionCell

public SelectionCell(java.util.List<java.lang.String> options)
Contruct a new SelectionCell with the specified options.

Parameters:
options - the options in the cell.s
Method Detail

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