Package com.google.gwt.cell.client
Class ClickableTextCell
- java.lang.Object
-
- com.google.gwt.cell.client.AbstractCell<C>
-
- com.google.gwt.cell.client.AbstractSafeHtmlCell<java.lang.String>
-
- com.google.gwt.cell.client.ClickableTextCell
-
- All Implemented Interfaces:
Cell<java.lang.String>
public class ClickableTextCell extends AbstractSafeHtmlCell<java.lang.String>
ACellused to render text. Clicking on the cell causes itsValueUpdaterto be called.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
-
-
Constructor Summary
Constructors Constructor Description ClickableTextCell()Construct a new ClickableTextCell that will use aSimpleSafeHtmlRenderer.ClickableTextCell(SafeHtmlRenderer<java.lang.String> renderer)Construct a new ClickableTextCell that will use a givenSafeHtmlRenderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonBrowserEvent(Cell.Context context, Element parent, java.lang.String value, NativeEvent event, ValueUpdater<java.lang.String> valueUpdater)Handle a browser event that took place within the cell.protected voidonEnterKeyDown(Cell.Context context, Element parent, java.lang.String value, NativeEvent event, ValueUpdater<java.lang.String> valueUpdater)Called when the user triggers akeydownevent with the ENTER key while focused on the cell.protected voidrender(Cell.Context context, SafeHtml value, SafeHtmlBuilder sb)Render the cell contents after they have been converted toSafeHtmlform.-
Methods inherited from class com.google.gwt.cell.client.AbstractSafeHtmlCell
getRenderer, render
-
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, resetFocus, setValue
-
-
-
-
Constructor Detail
-
ClickableTextCell
public ClickableTextCell()
Construct a new ClickableTextCell that will use aSimpleSafeHtmlRenderer.
-
ClickableTextCell
public ClickableTextCell(SafeHtmlRenderer<java.lang.String> renderer)
Construct a new ClickableTextCell that will use a givenSafeHtmlRenderer.- Parameters:
renderer- aSafeHtmlRendererinstance
-
-
Method Detail
-
onBrowserEvent
public void onBrowserEvent(Cell.Context context, Element parent, java.lang.String value, NativeEvent event, ValueUpdater<java.lang.String> valueUpdater)
Description copied from class:AbstractCellHandle 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.
- Specified by:
onBrowserEventin interfaceCell<java.lang.String>- Overrides:
onBrowserEventin classAbstractCell<java.lang.String>- Parameters:
context- theCell.Contextof the cellparent- the parent Elementvalue- the value associated with the cellevent- the native browser eventvalueUpdater- aValueUpdater, or null if not specified
-
onEnterKeyDown
protected void onEnterKeyDown(Cell.Context context, Element parent, java.lang.String value, NativeEvent event, ValueUpdater<java.lang.String> valueUpdater)
Description copied from class:AbstractCellCalled when the user triggers akeydownevent 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 consumekeydownevents for this method to be called.- Overrides:
onEnterKeyDownin classAbstractCell<java.lang.String>- Parameters:
context- theCell.Contextof the cellparent- the parent Elementvalue- the value associated with the cellevent- the native browser eventvalueUpdater- aValueUpdater, or null if not specified
-
render
protected void render(Cell.Context context, SafeHtml value, SafeHtmlBuilder sb)
Description copied from class:AbstractSafeHtmlCellRender the cell contents after they have been converted toSafeHtmlform.- Specified by:
renderin classAbstractSafeHtmlCell<java.lang.String>- Parameters:
context- the original context to rendervalue- aSafeHtmlstringsb- theSafeHtmlBuilderto be written to
-
-