Package com.volantis.styling.sheet

Examples of com.volantis.styling.sheet.CompiledStyleSheet


            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


        CompilerConfiguration configuration = factory.createCompilerConfiguration();
        configuration.setSource(StyleSheetSource.THEME);

        StyleSheetCompiler compiler = factory.createStyleSheetCompiler(configuration);
        CompiledStyleSheet sheet = compiler.compileStyleSheet(styleSheet);

        StylingEngine engine = factory.createStylingEngine();
        engine.pushStyleSheet(sheet);
        return engine;
    }
View Full Code Here

        configuration.setSource(StyleSheetSource.THEME);
        configuration.addFunctionResolver(functionResolverMock);
        StyleSheetCompiler compiler =
                stylingFactory.createStyleSheetCompiler(configuration);

        CompiledStyleSheet compiledStyleSheet =
                compiler.compileStyleSheet(styleSheet);

        StylingEngine engine = stylingFactory.createStylingEngine();

        engine.pushStyleSheet(compiledStyleSheet);
View Full Code Here

    public void pop(CompiledStyleSheet styleSheet) {
        if (styleSheet == null) {
            throw new IllegalArgumentException("styleSheet cannot be null");
        }

        CompiledStyleSheet poppedStyleSheet = (CompiledStyleSheet) stack.pop();
        if (poppedStyleSheet != styleSheet) {
            throw new IllegalStateException(
                    "Popped style sheet " + poppedStyleSheet +
                    " does not match expected style sheet " + styleSheet);
        }
View Full Code Here

                stylingFactory.createCompilerConfiguration();
        configuration.setSource(StyleSheetSource.THEME);
        configuration.addFunctionResolver(StylingFunctions.getResolver());
        StyleSheetCompiler compiler = stylingFactory.createStyleSheetCompiler(
                configuration);
        CompiledStyleSheet compiledStyleSheet = compiler.compileStyleSheet(null);

        DeviceLayoutContext deviceLayoutContext =
                new TestDeviceLayoutContext(pageContext);
        deviceLayoutContext.setMarinerPageContext(pageContext);
        RuntimeDeviceLayout runtimeDeviceLayout = new RuntimeLayoutAdapter(
View Full Code Here

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

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

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

        // attributes should only effect the element they were specified for
        // so to ensure this happens a Matcher is used to match element ids.
        // These element ids are set using the current style depth before the
        // additional style sheet is added.
        String inlineStyleValue = attributes.getAttributeValue(null, "style");
        CompiledStyleSheet compiledStyleSheet = null;
        int currentStyleDepth = styleSheetStack.depth();
        if (inlineStyleValue != null) {
            compiledStyleSheet = compileInlineStyleValue(inlineStyleValue);
            if (compiledStyleSheet != null) {
                pushStyleSheet(compiledStyleSheet);
View Full Code Here

        // Discard the element information from the context.
        ElementStackFrame elementStackFrame =
                elementStack.pop(namespace, localName);
       
        //process any inline style sheet which may have been added to the stack
        CompiledStyleSheet inlineStyleSheet =
                elementStackFrame.getInlineStyleSheet();

        if (inlineStyleSheet != null) {
            popStyleSheet(inlineStyleSheet);
        }
View Full Code Here

            // Create the list of theme style sheets that apply for this page
            // and add the single canvas theme into it (for now). More can
            // be added later by the <style> element.
            themeStyleSheets = new CompiledStyleSheetCollection();
            if (themeName != null) {
                CompiledStyleSheet compiledStyleSheet =
                        pageContext.retrieveThemeStyleSheet(themeName);
                if (compiledStyleSheet != null) {
                    themeStyleSheets.addStyleSheet(compiledStyleSheet);
                }
            } else {
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

TOP

Related Classes of com.volantis.styling.sheet.CompiledStyleSheet

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.