public String getInnerHtmlStyle() {
StringBuffer sb = new StringBuffer();
if (_cell != null) {
Format format = _cell.getFormat();
if (format == null)
return "";
String fontName = format.getFontType();
if (fontName != null) {
sb.append("font-family:").append(fontName).append(";");
}
TextHAlign textHAlign = _cell.getTextHAlign();
if (textHAlign != null) {
if (textHAlign.equals(TextHAlign.RIGHT)) {
sb.append("text-align:").append("right").append(";");
} else if (textHAlign.equals(TextHAlign.CENTER)) {
sb.append("text-align:").append("center").append(";");
}
}
boolean textWrap = format.isTextWrap();
if (textWrap) {
sb.append("white-space:").append("normal").append(";");
}/*else{ sb.append("white-space:").append("nowrap").append(";"); }*/
String textColor = _cell.getTextColor();
if (AUTO_COLOR.equals(textColor)) {
textColor = "#000000";
}
if (textColor != null) {
sb.append("color:").append(textColor).append(";");
}
FontUnderline fontUnderline = format.getFontUnderline();
boolean striketThrough = format.isFontStrikethrough();
if (!striketThrough && fontUnderline != null) {
if (fontUnderline.equals(FontUnderline.SINGLE) || fontUnderline.equals(FontUnderline.SINGLEA)) {
sb.append("text-decoration:").append("underline;");
} else if (fontUnderline.equals(FontUnderline.DOUBLE) || fontUnderline.equals(FontUnderline.DOUBLEA)) {
}
}
if (striketThrough) {
sb.append("text-decoration:").append("line-through;");
}
FontStyle fontStyle = format.getFontStyle();
if (fontStyle != null) {
if (fontStyle.equals(FontStyle.BOLDITALIC)) {
sb.append("font-weight:").append("bold;");
sb.append("font-style:").append("italic;");
} else if (fontStyle.equals(FontStyle.ITALIC)) {
sb.append("font-style:").append("italic;");
} else if (fontStyle.equals(FontStyle.BOLD)) {
sb.append("font-weight:").append("bold;");
}
}
int fontSize = format.getFontSize();
sb.append("font-size:").append(fontSize).append("pt;");
}
return sb.toString();