Package com.volantis.styling.compiler

Examples of com.volantis.styling.compiler.CSSCompiler.compile()


            Document actualXml, String expectedStyledElements,
            List indexedProperties,
            final String deviceCSS) {
        CSSCompiler compiler = StylingFactory.getDefaultInstance()
                .createDeviceCSSCompiler(DeviceOutlook.OPTIMISTIC);
        CompiledStyleSheet deviceStyleSheet = compiler.compile(
                new StringReader(deviceCSS), null);

        PropertyDetailsSet detailsSet =
                PropertyDetailsSetHelper.getDetailsSet(indexedProperties);
View Full Code Here


        builder.setStyleSheetCompilerFactory(
                ThemeStyleSheetCompilerFactory.getDefaultInstance());
        CSSCompiler cssCompiler = builder.getCSSCompiler();

        final CompiledStyleSheet compiledStyleSheet =
            cssCompiler.compile(reader, null);

        pageContext.getStylingEngine().pushStyleSheet(compiledStyleSheet);
    }
}
/*
 
View Full Code Here

        extractorBuilder.setDetailsSet(detailsSet);
        extractorBuilder.setSupportedShorthands(supportedShorthands);

        CSSCompiler compiler = StylingFactory.getDefaultInstance()
                .createDeviceCSSCompiler(DeviceOutlook.OPTIMISTIC);
        CompiledStyleSheet deviceStyleSheet = compiler.compile(
                new StringReader(DevicePolicyConstants.DEFAULT_DISPLAY_CSS), null);
        extractorBuilder.setDeviceStyleSheet(deviceStyleSheet);

        ExtractorConfiguration configuration =
                extractorBuilder.buildConfiguration();
View Full Code Here

        CompiledStyleSheet defaultCompiledStyleSheet;
        try {
            URL url = getClass().getResource("/com/volantis/mcs/runtime/default.css");
            InputStream stream = url.openStream();
            defaultCompiledStyleSheet = cssCompiler.compile(
                    new InputStreamReader(stream), null);
        } catch (IOException e) {
            throw new ExtendedRuntimeException(e);
        }
View Full Code Here

        StylingFactory factory = StylingFactory.getDefaultInstance();
        CSSCompiler compiler = factory.createDeviceCSSCompiler(
                DeviceOutlook.REALISTIC);

        return compiler.compile(new StringReader(defaultCSS), sourceDescription);
    }

    // Javadoc inherited.
    public IterationAction next(CSSProperty cssProperty) {
        final StyleProperty property = cssProperty.getStyleProperty();
View Full Code Here

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        CSSCompiler compiler = factory.createDeviceCSSCompiler(DeviceOutlook.REALISTIC);
        CompiledStyleSheet compiledSheet = compiler.compile(new StringReader(
                "* {text-align: left}" +
                "a {font-family: <not-set>}" +
                "a:link {font-size: <unknown> !-medium}" +
                "a:link:hover {color: <default>}" +
                "a:first-letter:link {color: green}"),
View Full Code Here

            CSSCompiler cssCompiler = builder.getCSSCompiler();

            // convert the css into StyleSheet
            final InputStreamReader reader = new InputStreamReader(
                    cssInputResourceStream);
            compiledStyleSheet = cssCompiler.compile(reader, null);

        } catch (ExceptionInInitializerError e) {
        }

        return compiledStyleSheet;
View Full Code Here

        // engine.
        CompiledStyleSheet defaultCompiledStyleSheet;
        try {
            URL url = getClass().getResource("/com/volantis/mcs/runtime/default.css");
            InputStream stream = url.openStream();
            defaultCompiledStyleSheet = cssCompiler.compile(
                    new InputStreamReader(stream), null);
        } catch (IOException e) {
            throw new ExtendedRuntimeException(e);
        }
        stylingEngine.pushStyleSheet(defaultCompiledStyleSheet);
View Full Code Here

            builder.setParserMode(CSSParserMode.LAX);
            CSSCompiler cssCompiler = builder.getCSSCompiler();

            // Parse and compile the style sheet.
            CompiledStyleSheet compiledStyleSheet =
                    cssCompiler.compile(new StringReader(css), null);

            // adding style sheet to the list of style sheets
            // that should be stored for current element
            StylingEngine stylingEngine = pageContext.getStylingEngine();
            stylingEngine.addNestedStyleSheet(compiledStyleSheet);
View Full Code Here

            builder.setParserMode(CSSParserMode.LAX);
            CSSCompiler cssCompiler = builder.getCSSCompiler();

            // Parse and then compile the css into compiled style sheet.
            CompiledStyleSheet compiledStyleSheet =
                    cssCompiler.compile(new StringReader(css), null);

            // Add the compiled style sheet into the html element to be
            // processed later.
            htmlElement.addInlineStyleSheet(compiledStyleSheet);
        }
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.