Package com.google.gwt.cell.client
Class ButtonCell
A
Cell used to render a button.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new ButtonCell that will use aSimpleSafeHtmlRenderer.ButtonCell(SafeHtmlRenderer<String> renderer) Construct a new ButtonCell that will use a givenSafeHtmlRenderer. -
Method Summary
Modifier and TypeMethodDescriptionvoidonBrowserEvent(Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) Handle a browser event that took place within the cell.protected voidonEnterKeyDown(Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) Called when the user triggers akeydownevent with the ENTER key while focused on the cell.voidrender(Cell.Context context, SafeHtml data, SafeHtmlBuilder sb) Render the cell contents after they have been converted toSafeHtmlform.Methods inherited from class com.google.gwt.cell.client.AbstractSafeHtmlCell
getRenderer, renderMethods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, resetFocus, setValue
-
Constructor Details
-
ButtonCell
public ButtonCell()Construct a new ButtonCell that will use aSimpleSafeHtmlRenderer.
-
-
Method Details
-
onBrowserEvent
public void onBrowserEvent(Cell.Context context, Element parent, String value, NativeEvent event, ValueUpdater<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<String>- Overrides:
onBrowserEventin classAbstractCell<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, String value, NativeEvent event, ValueUpdater<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<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
-