com.vaadin.client.renderers
Class ClickableRenderer<T,W extends Widget>
java.lang.Object
com.vaadin.client.renderers.ComplexRenderer<T>
com.vaadin.client.renderers.WidgetRenderer<T,W>
com.vaadin.client.renderers.ClickableRenderer<T,W>
- Type Parameters:
T - the presentation (column) typeW - the widget type
- All Implemented Interfaces:
- Renderer<T>
- Direct Known Subclasses:
- ButtonRenderer, ImageRenderer, MultiSelectionRenderer
public abstract class ClickableRenderer<T,W extends Widget>
- extends WidgetRenderer<T,W>
An abstract superclass for renderers that render clickable widgets. Click
handlers can be added to a renderer to listen to click events emitted by all
widgets rendered by the renderer.
- Since:
- 7.4
- Author:
- Vaadin Ltd
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClickableRenderer
public ClickableRenderer()
createWidget
public abstract W createWidget()
- 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.
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.
- Specified by:
createWidget in class WidgetRenderer<T,W extends Widget>
- Returns:
- widget to attach to a cell. All returned instances should be new
widget instances without a parent.
addClickHandler
public com.google.web.bindery.event.shared.HandlerRegistration addClickHandler(ClickableRenderer.RendererClickHandler<?> handler)
- Adds a click handler to this button renderer. The handler is invoked
every time one of the widgets rendered by this renderer is clicked.
Note that the row type of the click handler must match the row type of
the containing Grid.
- Parameters:
handler - the click handler to be added
onClick
public void onClick(ClickEvent event)
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.