if (UtilValidate.isEmpty(this.origText)) {
return;
}
StringBuffer newContent = new StringBuffer();
XStyle style = null;
if (this.isEnabled) {
style = enabledStyle;
} else {
style = disabledStyle;
}
// get the hex color for the current style
String fcolor = Integer.toHexString(style.getStyleAsColor(XStyle.COLOR_FORE).getRGB() & 0x00ffffff);
xbutton.setBackground(style.getStyleAsColor(XStyle.COLOR_BACK));
// add the # for the HTML color
if (fcolor.equals("0")) {
fcolor = "#000000";
} else {
fcolor = "#" + fcolor;
}
// get the additional styles
boolean isItalic = false;
boolean isBold = false;
if (style.getStyleAsInt(XStyle.FONT_WEIGHT) > 0) {
isBold = true;
}
if (style.getStyleAsInt(XStyle.FONT_ITALIC) > 0) {
isItalic = true;
}
// open with prefix (opening tags)
newContent.append(prefix.replaceAll("\\$\\{FCOLOR\\}", fcolor));