public class ImageRenderer extends ClickableRenderer<String,com.google.gwt.user.client.ui.Image>
ClickableRenderer.RendererClickEvent<R>, ClickableRenderer.RendererClickHandler<R>| Modifier and Type | Field and Description |
|---|---|
static String |
TRANSPARENT_GIF_1PX
Placeholder URL for the image.
|
| Constructor and Description |
|---|
ImageRenderer() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.user.client.ui.Image |
createWidget()
Creates a widget to attach to a cell.
|
void |
render(RendererCellReference cell,
String url,
com.google.gwt.user.client.ui.Image image)
Renders a cell with a widget.
|
addClickHandler, onClickgetWidget, getWidget, init, renderdestroy, destroy, getConsumedEvents, onActivate, onBrowserEvent, setContentVisiblepublic static final String TRANSPARENT_GIF_1PX
public com.google.gwt.user.client.ui.Image 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.Image>public void render(RendererCellReference cell, String url, com.google.gwt.user.client.ui.Image image)
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.Image>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.url - the data of the cellimage - the widget embedded in the cellCopyright © 2021 Vaadin Ltd. All rights reserved.