|
GWT 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.cell.client.AbstractCell<C>
com.google.gwt.cell.client.AbstractEditableCell<java.lang.String,com.google.gwt.cell.client.EditTextCell.ViewData>
com.google.gwt.cell.client.EditTextCell
public class EditTextCell
An editable text cell. Click to edit, escape to cancel, return to commit. Important TODO: This cell still treats its value as HTML for rendering purposes, which is entirely wrong. It should be able to treat it as a proper string (especially since that's all the user can enter).
| Constructor Summary | |
|---|---|
EditTextCell()
Construct a new EditTextCell that will use a SimpleSafeHtmlRenderer. |
|
EditTextCell(SafeHtmlRenderer<java.lang.String> renderer)
Construct a new EditTextCell that will use a given SafeHtmlRenderer. |
|
| Method Summary | |
|---|---|
protected void |
edit(Element parent,
java.lang.String value,
java.lang.Object key)
Convert the cell to edit mode. |
boolean |
isEditing(Element element,
java.lang.String value,
java.lang.Object key)
Returns true if the cell is currently editing the data identified by the given element and key. |
void |
onBrowserEvent(Element parent,
java.lang.String value,
java.lang.Object key,
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 key,
SafeHtmlBuilder sb)
Render a cell as HTML into a SafeHtmlBuilder, suitable for passing
to Element.setInnerHTML(java.lang.String) on a container element. |
boolean |
resetFocus(Element parent,
java.lang.String value,
java.lang.Object key)
Reset focus on the Cell. |
| Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell |
|---|
clearViewData, getViewData, setViewData |
| Methods inherited from class com.google.gwt.cell.client.AbstractCell |
|---|
dependsOnSelection, getConsumedEvents, handlesSelection, onEnterKeyDown, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditTextCell()
SimpleSafeHtmlRenderer.
public EditTextCell(SafeHtmlRenderer<java.lang.String> renderer)
SafeHtmlRenderer.
renderer - a SafeHtmlRenderer instance| Method Detail |
|---|
public boolean isEditing(Element element,
java.lang.String value,
java.lang.Object key)
AbstractEditableCell
isEditing in interface Cell<java.lang.String>isEditing in class AbstractEditableCell<java.lang.String,com.google.gwt.cell.client.EditTextCell.ViewData>element - the parent Elementvalue - the value associated with the cellkey - the unique key associated with the row object
public void onBrowserEvent(Element parent,
java.lang.String value,
java.lang.Object key,
NativeEvent event,
ValueUpdater<java.lang.String> valueUpdater)
AbstractCellIf you override this method to add support for events, remember to pass the event types that the cell expects into the constructor.
onBrowserEvent in interface Cell<java.lang.String>onBrowserEvent in class AbstractCell<java.lang.String>parent - the parent Elementvalue - the value associated with the cellkey - the unique key associated with the row objectevent - the native browser eventvalueUpdater - a ValueUpdater, or null if not specified
public void render(java.lang.String value,
java.lang.Object key,
SafeHtmlBuilder sb)
CellSafeHtmlBuilder, suitable for passing
to Element.setInnerHTML(java.lang.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.
render in interface Cell<java.lang.String>render in class AbstractCell<java.lang.String>value - the cell value to be renderedkey - the unique key associated with the row objectsb - the SafeHtmlBuilder to be written to
public boolean resetFocus(Element parent,
java.lang.String value,
java.lang.Object key)
AbstractCellThis method is a no-op and returns false. If your cell is editable or can be focused by the user, override this method to reset focus when the containing widget is refreshed.
resetFocus in interface Cell<java.lang.String>resetFocus in class AbstractCell<java.lang.String>parent - the parent Elementvalue - the value associated with the cellkey - the unique key associated with the row object
protected void edit(Element parent,
java.lang.String value,
java.lang.Object key)
parent - the parent elementvalue - the current valuekey - the key of the row object
|
GWT 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||