public class IconCell extends AbstractCell<Void>
final IconCell iCell = new IconCell(IconType.INFO_SIGN, IconSize.LARGE);
Column<OneObject, Void> iconColumn = new Column<OneObject, Void>(iCell) {
public Void getValue(OneObject object) {
if (object.getOneValue() > 0) {
iCell.setIconType(IconType.PLUS_SIGN);
iCell.setTooltip("High");
}
if (object.getOneValue() < 0) {
iCell.setIconType(IconType.MINUS_SIGN);
iCell.setTooltip("Low");
}
return null;
}
};
Cell.Context
Constructor and Description |
---|
IconCell(IconType iconType)
Construct a new
IconCell with the specified icon type |
IconCell(IconType iconType,
IconSize iconSize)
Construct a new
IconCell with the specified icon type and icon size |
Modifier and Type | Method and Description |
---|---|
IconSize |
getIconSize() |
IconType |
getIconType() |
String |
getTooltip() |
void |
render(Cell.Context context,
Void value,
SafeHtmlBuilder sb) |
void |
setIconSize(IconSize iconSize) |
void |
setIconType(IconType iconType) |
void |
setTooltip(String tooltip) |
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, onBrowserEvent, onEnterKeyDown, resetFocus, setValue
public IconCell(IconType iconType)
IconCell
with the specified icon typeiconType
- public void render(Cell.Context context, Void value, SafeHtmlBuilder sb)
public IconType getIconType()
public void setIconType(IconType iconType)
public IconSize getIconSize()
public void setIconSize(IconSize iconSize)
public String getTooltip()
public void setTooltip(String tooltip)
Copyright © 2012-2013 gwtbootstrap. All Rights Reserved.