com.vaadin.client.ui.grid.selection
Class MultiSelectionRenderer<T>

java.lang.Object
  extended by com.vaadin.client.ui.grid.renderers.ComplexRenderer<java.lang.Boolean>
      extended by com.vaadin.client.ui.grid.selection.MultiSelectionRenderer<T>
All Implemented Interfaces:
Renderer<java.lang.Boolean>

public class MultiSelectionRenderer<T>
extends ComplexRenderer<java.lang.Boolean>


Constructor Summary
MultiSelectionRenderer(Grid<T> grid)
           
 
Method Summary
 void destroy()
          Called when the renderer is deemed to be destroyed and no longer used by the Grid.
 java.util.Collection<java.lang.String> getConsumedEvents()
          Returns the events that the renderer should consume.
 void init(FlyweightCell cell)
          Called at initialization stage.
protected  boolean isSelected(int logicalRow)
           
 boolean onBrowserEvent(Cell cell, NativeEvent event)
          Called whenever a registered event is triggered in the column the renderer renders.
 void render(FlyweightCell cell, java.lang.Boolean data)
          Called whenever the Grid updates a cell
protected  void setSelected(int logicalRow, boolean select)
           
 
Methods inherited from class com.vaadin.client.ui.grid.renderers.ComplexRenderer
destroy, onActivate, setContentVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiSelectionRenderer

public MultiSelectionRenderer(Grid<T> grid)
Method Detail

destroy

public void destroy()
Description copied from class: ComplexRenderer
Called when the renderer is deemed to be destroyed and no longer used by the Grid.

Overrides:
destroy in class ComplexRenderer<java.lang.Boolean>

init

public void init(FlyweightCell cell)
Description copied from class: ComplexRenderer
Called at initialization stage. Perform any initialization here e.g. attach handlers, attach widgets etc.

Specified by:
init in class ComplexRenderer<java.lang.Boolean>
Parameters:
cell - The cell. Note that the cell is not to be stored outside of the method as the cell install will change. See FlyweightCell

render

public void render(FlyweightCell cell,
                   java.lang.Boolean data)
Description copied from interface: Renderer
Called whenever the Grid updates a cell

Parameters:
cell - The cell. Note that the cell is a flyweight and should not be stored outside of the method as it will change.
data - The column data object

getConsumedEvents

public java.util.Collection<java.lang.String> getConsumedEvents()
Description copied from class: ComplexRenderer
Returns the events that the renderer should consume. These are also the events that the Grid will pass to ComplexRenderer.onBrowserEvent(Cell, NativeEvent) when they occur.

Overrides:
getConsumedEvents in class ComplexRenderer<java.lang.Boolean>
Returns:
a list of consumed events
See Also:
com.google.gwt.dom.client.BrowserEvents

onBrowserEvent

public boolean onBrowserEvent(Cell cell,
                              NativeEvent event)
Description copied from class: ComplexRenderer
Called whenever a registered event is triggered in the column the renderer renders.

The events that triggers this needs to be returned by the ComplexRenderer.getConsumedEvents() method.

Returns boolean telling if the event has been completely handled and should not cause any other actions.

Overrides:
onBrowserEvent in class ComplexRenderer<java.lang.Boolean>
Parameters:
cell - Object containing information about the cell the event was triggered on.
event - The original DOM event
Returns:
true if event should not be handled by grid

isSelected

protected boolean isSelected(int logicalRow)

setSelected

protected void setSelected(int logicalRow,
                           boolean select)


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