Package com.volantis.styling.sheet

Examples of com.volantis.styling.sheet.CompiledStyleSheet


        if (!immutable) {
            throw new IllegalStateException();
        }

        for (int i = compiledStyleSheets.size() - 1; i >= 0; i--) {
            CompiledStyleSheet styleSheet = (CompiledStyleSheet)
                    compiledStyleSheets.get(i);
            stylingEngine.popStyleSheet(styleSheet);
        }
    }
View Full Code Here


     * @return CompiledStyleSheet
     */
    public static CompiledStyleSheet compileStyleSheet(
            InputStream cssInputResourceStream) {

        CompiledStyleSheet compiledStyleSheet = null;

        try {
            // Create a CSS compiler.
            CSSCompilerBuilder builder = new CSSCompilerBuilder();
            builder.setStyleSheetCompilerFactory(
View Full Code Here

                String projectThemeLocation = (String) themeLocations.next();
                if (projectThemeLocation != null) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Project theme: " + projectThemeLocation);
                    }
                    CompiledStyleSheet projectStyleSheet =
                            pageContext.retrieveThemeStyleSheet(
                                    projectThemeLocation);
                    if (projectStyleSheet != null) {
                        themeStyleSheets.addStyleSheet(projectStyleSheet);
                    }
View Full Code Here

                } else if (THEME.equals(linkType)) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Link theme: " + linkValue);
                    }
                    MarinerPageContext pageContext = getPageContext(context);
                    CompiledStyleSheet themeStyleSheet = pageContext
                            .retrieveThemeStyleSheet(linkValue);
                    if (themeStyleSheet != null) {
                        widgetResponseElement
                                .addLinkStyleSheet(themeStyleSheet);
                    }
View Full Code Here

                DefaultStyleSheetCompilerFactory.getDefaultInstance());
        CSSCompiler cssCompiler = builder.getCSSCompiler();

        // Compile and push the system default style sheet into the styling
        // 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);
View Full Code Here

     * @param themeName the name of the theme, may not be null.
     * @return the compiled style sheet for the theme if it exists, otherwise
     *         null.
     */
    public CompiledStyleSheet retrieveThemeStyleSheet(String themeName) {
        CompiledStyleSheet styleSheet = null;

        if (themeName == null) {
            throw new IllegalArgumentException("themeName cannot be null");
        }

View Full Code Here

                    ThemeStyleSheetCompilerFactory.getDefaultInstance());
            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();
View Full Code Here

                (ActivatedThemeContent) activatedContent;

        StyleSheetCompiler styleSheetCompiler = ThemeStyleSheetCompilerFactory.
                getDefaultInstance().createStyleSheetCompiler();

        CompiledStyleSheet compiledStyleSheet =
                styleSheetCompiler.compileStyleSheet(
                        activatedThemeContent.getStyleSheet());

        return new RuntimeThemeAdapter(null, compiledStyleSheet);
    }
View Full Code Here

                } else if (THEME.equals(linkType)) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Link theme: " + linkValue);
                    }
                    MarinerPageContext pageContext = getPageContext(context);
                    CompiledStyleSheet themeStyleSheet =
                            pageContext.retrieveThemeStyleSheet(linkValue);
                    if (themeStyleSheet != null) {
                        htmlElement.addLinkStyleSheet(themeStyleSheet);
                    }
                } else if (logger.isDebugEnabled()) {
View Full Code Here

                    ThemeStyleSheetCompilerFactory.getDefaultInstance());
            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

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.