|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.cell.client.AbstractCell<C>
com.google.gwt.cell.client.IconCellDecorator<C>
C - the type that this Cell representspublic class IconCellDecorator<C>
A Cell decorator that adds an icon to another Cell.
Note: This class is new and its interface subject to change.
| Constructor Summary | |
|---|---|
IconCellDecorator(ImageResource icon,
Cell<C> cell)
Construct a new IconCellDecorator. |
|
IconCellDecorator(ImageResource icon,
Cell<C> cell,
HasVerticalAlignment.VerticalAlignmentConstant valign,
int spacing)
Construct a new IconCellDecorator. |
|
| Method Summary | |
|---|---|
boolean |
consumesEvents()
Returns true if the cell is interested in browser events. |
boolean |
dependsOnSelection()
Check if this cell depends on the selection state. |
java.lang.Object |
onBrowserEvent(Element parent,
C value,
java.lang.Object viewData,
NativeEvent event,
ValueUpdater<C> valueUpdater)
Handle a browser event that took place within the cell. |
void |
render(C value,
java.lang.Object viewData,
java.lang.StringBuilder sb)
Render a cell as HTML into a StringBuilder, suitable for passing to Element.setInnerHTML(java.lang.String) on a container element. |
void |
setValue(Element parent,
C value,
java.lang.Object viewData)
This method may be used by cell containers to set the value on a single cell directly, rather than using Element.setInnerHTML(String). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IconCellDecorator(ImageResource icon,
Cell<C> cell)
IconCellDecorator. The icon and the content will be
middle aligned by default.
icon - the icon to usecell - the cell to decorate
public IconCellDecorator(ImageResource icon,
Cell<C> cell,
HasVerticalAlignment.VerticalAlignmentConstant valign,
int spacing)
IconCellDecorator.
icon - the icon to usecell - the cell to decoratevalign - the vertical alignment attribute of the contentsspacing - the pixel space between the icon and the cell| Method Detail |
|---|
public boolean consumesEvents()
Cell
consumesEvents in interface Cell<C>consumesEvents in class AbstractCell<C>public boolean dependsOnSelection()
Cell
dependsOnSelection in interface Cell<C>dependsOnSelection in class AbstractCell<C>
public java.lang.Object onBrowserEvent(Element parent,
C value,
java.lang.Object viewData,
NativeEvent event,
ValueUpdater<C> valueUpdater)
Cell
onBrowserEvent in interface Cell<C>onBrowserEvent in class AbstractCell<C>parent - the parent Elementvalue - the value associated with the cellviewData - the view data associated with the cell, or nullevent - the native browser eventvalueUpdater - a ValueUpdater, or null
public void render(C value,
java.lang.Object viewData,
java.lang.StringBuilder sb)
CellElement.setInnerHTML(java.lang.String) on a container element.
render in interface Cell<C>render in class AbstractCell<C>value - the cell value to be renderedviewData - view data associated with the cellsb - the StringBuilder to be written to
public void setValue(Element parent,
C value,
java.lang.Object viewData)
CellElement.setInnerHTML(String). See
AbstractCell.setValue(Element, Object, Object) for a default
implementation that uses Cell.render(Object, Object, StringBuilder).
setValue in interface Cell<C>setValue in class AbstractCell<C>parent - the parent Elementvalue - the value associated with the cellviewData - the view data associated with the cell, or null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||