Examples of XStyle


Examples of net.xoetrope.xui.style.XStyle

        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));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.