Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleSheet


                        addParentRules(policy, device, list);
                    }

                    // Add the style sheet rules for this after the parent's
                    // (if any) so that they will override the parent.
                    StyleSheet styleSheet = content.getStyleSheet();
                    list.addAll(styleSheet.getRules());
                }
                // Stop as soon as we have found a variant.
                return;
            }
            device = device.getFallbackDevice();           
View Full Code Here


                .returns(formatReferenceMock);

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        StyleSheet styleSheet = parseStyleSheet(
                "p {mcs-container: mcs-container-instance('alpha', 1)}");

        CompiledStyleSheet compiledStyleSheet =
                compiler.compileStyleSheet(styleSheet);
View Full Code Here

        assertSame(formatReferenceMock, formatReference);
    }

    private StyleSheet parseStyleSheet(final String css) {
        StringReader reader = new StringReader(css);
        StyleSheet styleSheet = parser.parseStyleSheet(reader, null);
        return styleSheet;
    }
View Full Code Here

                .returns(formatReferenceMock);

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        StyleSheet styleSheet = parseStyleSheet(
                "p {counter-reset: alpha 1}\n" +
                "p {mcs-container: mcs-container-instance('alpha', counter(alpha))}");

        CompiledStyleSheet compiledStyleSheet =
                compiler.compileStyleSheet(styleSheet);
View Full Code Here

    protected RuntimeDeviceTheme createRuntimeDeviceTheme() {

        String css = getCSS();

        CSSParser parser = CSS_PARSER_FACTORY.createStrictParser();
        StyleSheet styleSheet = parser.parseStyleSheet(new StringReader(css), null);

        return RuntimeDeviceLayoutTestHelper.activate(styleSheet);

    }
View Full Code Here

        }

        CompiledStyleSheet compiledStyleSheet;

        // Parse the CSS into a style sheet.
        StyleSheet styleSheet = parser.parseStyleSheet(input, url);
        if (styleSheet == null) {
            throw new IllegalStateException("No style sheet generated");
        }

        // Activate the style sheet.
View Full Code Here

    private RuntimeDeviceTheme createRuntimeDeviceTheme() {

        String css = getCSS();

        CSSParser parser = CSS_PARSER_FACTORY.createStrictParser();
        StyleSheet styleSheet = parser.parseStyleSheet(new StringReader(css),
                                                       null);

        return RuntimeDeviceLayoutTestHelper.activate(styleSheet);
    }
View Full Code Here

        DeviceLayoutReplicator replicator = new DeviceLayoutReplicator();
        replicator.replicate(layout);


        // Create a StyleSheet from the layout and compile it.
        StyleSheet styleSheet =
                styleSheetBuilder.build(layout);

        styleSheetActivator.activate(styleSheet);

        StyleSheetCompiler compiler =
View Full Code Here

        this.styleSheetFactory = styleSheetFactory;
        this.builderSelector = builderSelector;
    }

    public StyleSheet build(Layout layout) {
        final StyleSheet styleSheet = styleSheetFactory.createStyleSheet();

        FormatVisitorAdapter visitor = new FormatVisitorAdapter() {

            public boolean visitFormat(Format format, Object object) {
View Full Code Here

            StyleSheetActivator styleSheetActivator,
            InternalThemeContent theme) {

        BaseStyleSheet baseStyleSheet = theme.getStyleSheet();

        StyleSheet styleSheet;
        if (baseStyleSheet instanceof StyleSheet) {

            // Compile the style sheet.
            styleSheet = (StyleSheet) baseStyleSheet;
View Full Code Here

TOP

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

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.