* org.eclipse.draw2d.geometry.Rectangle)
*/
public void paintFigure(Graphics g, Rectangle rect) {
if (_value != null) {
g.clipRect(rect);
ICSSStyle style = this.getCSSStyle();
if (style == null) {
style = DefaultStyle.getInstance();
}
int decoration = ((Integer) style
.getStyleProperty(ICSSPropertyID.ATTR_TEXTDECORATION))
.intValue();
ICSSFont font = style.getCSSFont();
g.setFont(font.getSwtFont());
Color newColor = null;
Object color = style.getColor();
if (color instanceof Color) {
g.setForegroundColor((Color) color);
} else if (color instanceof RGB) {
newColor = new Color(Display.getCurrent(), (RGB) color);
g.setForegroundColor(newColor);
} else {
g.setForegroundColor(ColorConstants.black);
}
Object textAlign = style
.getStyleProperty(ICSSPropertyID.ATTR_TEXTALIGN);
int begin = 0;
int end = 0;
int fontHeight = FigureUtilities.getFontMetrics(font.getSwtFont())
.getHeight();