public class

CellWidget

extends Widget
implements HasValue<T> HasKeyProvider<T>
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.cellview.client.CellWidget<C>

Class Overview

A Widget that wraps a Cell.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
CellWidget(Cell<C> cell)
Construct a new CellWidget with the specified cell and an initial value of null.
CellWidget(Cell<C> cell, ProvidesKey<C> keyProvider)
Construct a new CellWidget with the specified cell and key provider, and an initial value of null.
CellWidget(Cell<C> cell, C initialValue)
Construct a new CellWidget with the specified cell and initial value.
CellWidget(Cell<C> cell, C initialValue, ProvidesKey<C> keyProvider)
Construct a new CellWidget with the specified cell, initial value, and key provider.
Protected Constructors
CellWidget(Cell<C> cell, C initialValue, ProvidesKey<C> keyProvider, Element elem)
Creates a CellWidget with the specified cell, initial value, key provider, using the specified element as the wrapper around the cell.
Public Methods
HandlerRegistration addValueChangeHandler(ValueChangeHandler<C> handler)
Cell<C> getCell()
Get the Cell wrapped by this widget.
ProvidesKey<C> getKeyProvider()
Return the key provider.
C getValue()
Gets this object's value.
void onBrowserEvent(Event event)
Fired whenever a browser event is received.
void redraw()
Redraw the widget.
void setValue(C value, boolean fireEvents, boolean redraw)
Sets this object's value and optionally redraw the widget.
void setValue(C value)

This method will redraw the widget if the new value does not equal the existing value.

void setValue(C value, boolean fireEvents)

This method will redraw the widget if the new value does not equal the existing value.

[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.logical.shared.HasValueChangeHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.TakesValue
From interface com.google.gwt.user.client.ui.HasValue
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.view.client.HasKeyProvider

Public Constructors

public CellWidget (Cell<C> cell)

Construct a new CellWidget with the specified cell and an initial value of null.

Parameters
cell the cell to wrap

public CellWidget (Cell<C> cell, ProvidesKey<C> keyProvider)

Construct a new CellWidget with the specified cell and key provider, and an initial value of null.

Parameters
cell the cell to wrap
keyProvider the key provider used to get keys from values

public CellWidget (Cell<C> cell, C initialValue)

Construct a new CellWidget with the specified cell and initial value.

Parameters
cell the cell to wrap
initialValue the initial value of the Cell

public CellWidget (Cell<C> cell, C initialValue, ProvidesKey<C> keyProvider)

Construct a new CellWidget with the specified cell, initial value, and key provider.

Parameters
cell the cell to wrap
initialValue the initial value of the Cell
keyProvider the key provider used to get keys from values

Protected Constructors

protected CellWidget (Cell<C> cell, C initialValue, ProvidesKey<C> keyProvider, Element elem)

Creates a CellWidget with the specified cell, initial value, key provider, using the specified element as the wrapper around the cell.

Parameters
cell the cell to wrap
initialValue the initial value of the Cell
keyProvider the key provider used to get keys from values
elem the browser element to use

Public Methods

public HandlerRegistration addValueChangeHandler (ValueChangeHandler<C> handler)

public Cell<C> getCell ()

Get the Cell wrapped by this widget.

Returns
  • the Cell being wrapped

public ProvidesKey<C> getKeyProvider ()

Return the key provider.

Returns

public C getValue ()

Gets this object's value.

Returns
  • the object's value

public void onBrowserEvent (Event event)

Fired whenever a browser event is received.

Parameters
event the event received

public void redraw ()

Redraw the widget.

public void setValue (C value, boolean fireEvents, boolean redraw)

Sets this object's value and optionally redraw the widget. Fires ValueChangeEvent when fireEvents is true and the new value does not equal the existing value. Redraws the widget when redraw is true and the new value does not equal the existing value.

Parameters
value the object's new value
fireEvents fire events if true and value is new
redraw redraw the widget if true and value is new

public void setValue (C value)

This method will redraw the widget if the new value does not equal the existing value.

public void setValue (C value, boolean fireEvents)

This method will redraw the widget if the new value does not equal the existing value.