public class ButtonRenderer extends ClickableRenderer<String,com.google.gwt.user.client.ui.Button>
ClickableRenderer.RendererClickEvent<R>, ClickableRenderer.RendererClickHandler<R>| Constructor and Description |
|---|
ButtonRenderer() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.user.client.ui.Button |
createWidget()
Creates a widget to attach to a cell.
|
boolean |
isHtmlContentAllowed()
Returns whether HTML content is allowed.
|
void |
render(RendererCellReference cell,
String text,
com.google.gwt.user.client.ui.Button button)
Renders a cell with a widget.
|
void |
setHtmlContentAllowed(boolean htmlContentAllowed)
Sets whether HTML content is allowed.
|
addClickHandler, onClickgetWidget, getWidget, init, renderdestroy, destroy, getConsumedEvents, onActivate, onBrowserEvent, setContentVisiblepublic com.google.gwt.user.client.ui.Button createWidget()
ClickableRenderer
Implementation note: It is the implementing method's
responsibility to add this as a click handler of the returned
widget, or a widget nested therein, in order to make click events
propagate properly to handlers registered via
addClickHandler.
createWidget in class ClickableRenderer<String,com.google.gwt.user.client.ui.Button>public void setHtmlContentAllowed(boolean htmlContentAllowed)
htmlContentAllowed - true if HTML content allowed, false if
contents should be rendered as plain textpublic boolean isHtmlContentAllowed()
true if HTML content allowed, false if contents
are rendered as plain textpublic void render(RendererCellReference cell, String text, com.google.gwt.user.client.ui.Button button)
WidgetRenderer
For optimal performance, work done in this method should be kept to a
minimum since it will be called continuously while the user is scrolling.
The renderer can use Widget.setLayoutData(Object) to store cell
data that might be needed in e.g. event listeners.
render in class WidgetRenderer<String,com.google.gwt.user.client.ui.Button>cell - The cell to render. Note that the cell is a flyweight and
should not be stored and used outside of this method as its
contents will change.text - the data of the cellbutton - the widget embedded in the cellCopyright © 2023 Vaadin Ltd. All rights reserved.