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 |
---|---|
Alignment |
getAlignment() |
IconFlip |
getIconFlip() |
IconRotate |
getIconRotate() |
IconSize |
getIconSize() |
IconType |
getIconType() |
String |
getTooltip() |
boolean |
isBorder() |
boolean |
isLight() |
boolean |
isMuted() |
boolean |
isSpin() |
void |
render(Cell.Context context,
Void value,
SafeHtmlBuilder sb) |
void |
setAlignment(Alignment alignment) |
void |
setBorder(boolean border) |
void |
setIconFlip(IconFlip iconFlip) |
void |
setIconRotate(IconRotate iconRotate) |
void |
setIconSize(IconSize iconSize) |
void |
setIconType(IconType iconType) |
void |
setLight(boolean light) |
void |
setMuted(boolean muted) |
void |
setSpin(boolean spin) |
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 boolean isLight()
public void setLight(boolean light)
public boolean isMuted()
public void setMuted(boolean muted)
public boolean isBorder()
public void setBorder(boolean border)
public boolean isSpin()
public void setSpin(boolean spin)
public Alignment getAlignment()
public void setAlignment(Alignment alignment)
public IconRotate getIconRotate()
public void setIconRotate(IconRotate iconRotate)
public IconFlip getIconFlip()
public void setIconFlip(IconFlip iconFlip)
public String getTooltip()
public void setTooltip(String tooltip)
Copyright © 2012-2014 gwtbootstrap. All Rights Reserved.