com.vaadin.client.ui.grid.renderers
Class ImageRenderer

java.lang.Object
  extended by com.vaadin.client.ui.grid.renderers.ComplexRenderer<T>
      extended by com.vaadin.client.ui.grid.renderers.WidgetRenderer<java.lang.String,Image>
          extended by com.vaadin.client.ui.grid.renderers.ImageRenderer
All Implemented Interfaces:
Renderer<java.lang.String>

public class ImageRenderer
extends WidgetRenderer<java.lang.String,Image>

A renderer that renders an image into a cell.

Since:
Author:
Vaadin Ltd

Constructor Summary
ImageRenderer()
           
 
Method Summary
 Image createWidget()
          Creates a widget to attach to a cell.
 void render(FlyweightCell cell, java.lang.String url, Image image)
          Renders a cell with a widget.
 
Methods inherited from class com.vaadin.client.ui.grid.renderers.WidgetRenderer
getCell, getWidget, init, render
 
Methods inherited from class com.vaadin.client.ui.grid.renderers.ComplexRenderer
destroy, destroy, getConsumedEvents, onActivate, onBrowserEvent, setContentVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRenderer

public ImageRenderer()
Method Detail

createWidget

public Image createWidget()
Description copied from class: WidgetRenderer
Creates a widget to attach to a cell. The widgets will be attached to the cell after the cell element has been attached to DOM.

Specified by:
createWidget in class WidgetRenderer<java.lang.String,Image>
Returns:
widget to attach to a cell. All returned instances should be new widget instances without a parent.

render

public void render(FlyweightCell cell,
                   java.lang.String url,
                   Image image)
Description copied from class: WidgetRenderer
Renders a cell with a widget. This provides a way to update any information in the widget that is cell specific. Do not detach the Widget here, it will be done automatically by the Grid when the widget is no longer needed.

Specified by:
render in class WidgetRenderer<java.lang.String,Image>
Parameters:
cell - the cell to render
url - the data of the cell
image - the widget embedded in the cell


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.