Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleColorRGB


     * Private constructor for typesafe enum.
     * @param name the StyleColorName that this supports.
     */
    public NamedColor(StyleColorName name) {
        this.colorName = name.getName();
        StyleColorRGB standardRGB = name.getRGB();
        if (standardRGB == null) {
            // There is no standard RGB value so it must be a system color.
            SystemColor systemColor =
                    (SystemColor) NAME_2_SYSTEM_COLOR.get(name);
            hex = awtColorToHex(systemColor);
        } else {
            hex = ColorConverter.convertColorRGBToText(
                standardRGB.getRGB(), false).toUpperCase();
        }
    }
View Full Code Here


            StyleColorName color = (StyleColorName) value;
            result = renderName(color);
        } else if (value instanceof StyleColorPercentages) {
            // ignore percentages, HTML3.2 doesn't support 'em.
        } else if (value instanceof StyleColorRGB) {
            StyleColorRGB color = (StyleColorRGB) value;
            result = renderRGB(color);
        }

        return result;
    }
View Full Code Here

                    (red & 0x0000ff) << 16 |
                    (green & 0x0000ff) << 8 |
                    (blue & 0x0000ff);
            return getColorForRGB(percentRgb);
        } else if (color instanceof StyleColorRGB) {
            StyleColorRGB colorRGB = (StyleColorRGB) color;
            int rgb = colorRGB.getRGB();
            return getColorForRGB(rgb);
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.StyleColorRGB

Copyright © 2018 www.massapicom. 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.