Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleColor


    public void test() {

        Styles styles = StylesBuilder.getStyles("{color: blue}" +
                                                "::before {color: green}" +
                                                "::after {color: red}");
        StyleColor value;

        value = getColor(styles);
        assertEquals("Blue", StyleColorNames.BLUE, value);

        Styles beforeStyles = styles.getNestedStyles(PseudoElements.BEFORE);
View Full Code Here


    }
   
    public void testColorKeyword() {
       
        StyleColor color;
        color = StyleColorNames.WHITE;
        assertEquals("", VDXMLColorValue.WHITE, factory.getColor(color));
        color = StyleColorNames.BLUE;
        assertEquals("", VDXMLColorValue.BLUE, factory.getColor(color));
        color = StyleColorNames.BLACK;
View Full Code Here

        deviceContext.setFormatInstance(pane, NDimensionalIndex.ZERO_DIMENSIONS,
                paneInstance);
        pageContext.pushDeviceLayoutContext(deviceContext);

        MutablePropertyValues properties = createPropertyValues();
        StyleColor value =
            styleValueFactory.getColorByPercentages(null, 50, 50, 50);
        properties.setComputedValue(StylePropertyDetails.BACKGROUND_COLOR,
                value);
        properties.setComputedValue(StylePropertyDetails.TEXT_ALIGN,
                TextAlignKeywords.CENTER);
View Full Code Here

    private StyleColor toStyleColor(final String stringValue) {
        if (stringValue == null) {
            throw new IllegalArgumentException("Value cannot be null.");
        }

        StyleColor value = StyleColorNames.getColorByName(
                stringValue.toLowerCase());
        if (value != null) {
            return value;
        }
View Full Code Here

        HTML3_2ColorEmulationPropertyRenderer renderer =
                new HTML3_2ColorEmulationPropertyRenderer();
        Element node = domFactory.createElement();
        node.setName("p");

        StyleColor color = StyleColorNames.BLUE;
        renderer.apply(node, color);
        assertEquals("Buffer should match", "<p><font color=\"blue\"/></p>",
                DOMUtilities.toString(node));
    }
View Full Code Here

                new HTML3_2ColorEmulationPropertyRenderer();
        Element node = domFactory.createElement();
        node.setName("font");
        node.setAttribute("family", "serif");

        StyleColor color = StyleColorNames.BLUE;
        renderer.apply(node, color);
        assertEquals("Buffer should match", "<font color=\"blue\" family=\"serif\"/>",
                DOMUtilities.toString(node));
    }
View Full Code Here

        HTML3_2ColorEmulationPropertyRenderer renderer =
                new HTML3_2ColorEmulationPropertyRenderer();
        Element node = domFactory.createElement();
        node.setName("body");

        StyleColor color = StyleColorNames.BLUE;
        renderer.apply(node, color);
        assertEquals("Buffer should match",
                "<body text=\"blue\"/>",
                DOMUtilities.toString(node));
    }
View Full Code Here

        if (colour == null || colour.length() == 0) {
            return null;
        }

        StyleColor value = null;

        if (colour.startsWith("#")) {
            int rgb = -1;

            try {
View Full Code Here

TOP

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

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.