Package flash.css

Examples of flash.css.StyleSheet


        InputStream cssFileStream = null;

        try
        {
            FontManager fontManager = mxmlConfiguration.getFontsConfiguration().getTopLevelManager();
            StyleSheet styleSheet = new StyleSheet();
            styleSheet.checkDeprecation(mxmlConfiguration.showDeprecationWarnings());
            cssFileStream = cssFile.getInputStream();
            styleSheet.parse(cssFile.getName(), cssFileStream, ThreadLocalToolkit.getLogger(), fontManager);
            extractStyles(styleSheet, false);
        }
        catch (Exception exception)
        {
            CompilerMessage m = new ParseError(exception.getLocalizedMessage());
View Full Code Here


        }
       
        // System.out.println("parse1: " + source.getNameForReporting());
        FontManager fontManager = configuration.getFontsConfiguration().getTopLevelManager();

        StyleSheet styleSheet = new StyleSheet();
        styleSheet.checkDeprecation(configuration.showDeprecationWarnings());

        InputStream in = null;
        try
        {
            in = source.getInputStream();
            styleSheet.parse(source.getName(),
                             in,
                             ThreadLocalToolkit.getLogger(),
                             fontManager);
        }
        catch (Exception exception)
        {
            if (Trace.error)
            {
                exception.printStackTrace();
            }

            ParseError parseError = new ParseError(exception.getLocalizedMessage());
            parseError.setPath(source.getName());
            ThreadLocalToolkit.log(parseError);
            return null;
        }
        finally
        {
            if (in != null)
            {
                try
                {
                    in.close();
                }
                catch (IOException ex)
                {

                }
            }
        }       

        if (styleSheet.errorsExist())
        {
            // Error
            ThreadLocalToolkit.getLogger().log(new StyleSheetParseError(source.getName()));
        }
View Full Code Here

    private void parseStyle(StyleNode node, String stylePath, long lastModified, CDATANode cdata)
  {
    FontManager fontManager = mxmlConfiguration.getFontsConfiguration().getTopLevelManager();

    StyleSheet styleSheet = new StyleSheet();
    styleSheet.checkDeprecation(mxmlConfiguration.showDeprecationWarnings());
    styleSheet.parse(stylePath, new StringReader(cdata.image), ThreadLocalToolkit.getLogger(), fontManager);

    if (styleSheet.errorsExist())
    {
      // Error
      log(node, new StyleSheetParseError(stylePath));
    }
View Full Code Here

  private void parseStyle(StyleNode node, String enclosingDocumentPath, long lastModified, int startLine)
  {
    FontManager fontManager = mxmlConfiguration.getFontsConfiguration().getTopLevelManager();

    CDATANode cdata = (CDATANode) node.getChildAt(0);
    StyleSheet styleSheet = new StyleSheet();
    styleSheet.checkDeprecation(mxmlConfiguration.showDeprecationWarnings());
    styleSheet.parse(enclosingDocumentPath, startLine, new StringReader(cdata.image), ThreadLocalToolkit.getLogger(), fontManager);
    if (styleSheet.errorsExist())
    {
      // Error
      log(node, new StyleSheetParseError(enclosingDocumentPath));
    }
View Full Code Here

        InputStream cssFileStream = null;

        try
        {
            FontManager fontManager = mxmlConfiguration.getFontsConfiguration().getTopLevelManager();
            StyleSheet styleSheet = new StyleSheet();
            styleSheet.checkDeprecation(mxmlConfiguration.showDeprecationWarnings());
            cssFileStream = cssFile.getInputStream();
            styleSheet.parse(cssFile.getName(), cssFileStream, ThreadLocalToolkit.getLogger(), fontManager);
            extractStyles(styleSheet, false);
        }
        catch (Exception exception)
        {
            CompilerMessage m = new ParseError(exception.getLocalizedMessage());
View Full Code Here

        }
       
        // System.out.println("parse1: " + source.getNameForReporting());
        FontManager fontManager = configuration.getFontsConfiguration().getTopLevelManager();

        StyleSheet styleSheet = new StyleSheet();
        styleSheet.checkDeprecation(configuration.showDeprecationWarnings());

        InputStream in = null;
        try
        {
            in = source.getInputStream();
            styleSheet.parse(source.getName(),
                             in,
                             ThreadLocalToolkit.getLogger(),
                             fontManager);
        }
        catch (Exception exception)
        {
            if (Trace.error)
            {
                exception.printStackTrace();
            }

            ParseError parseError = new ParseError(exception.getLocalizedMessage());
            parseError.setPath(source.getName());
            ThreadLocalToolkit.log(parseError);
            return null;
        }
        finally
        {
            if (in != null)
            {
                try
                {
                    in.close();
                }
                catch (IOException ex)
                {

                }
            }
        }       

        if (styleSheet.errorsExist())
        {
            // Error
            ThreadLocalToolkit.getLogger().log(new StyleSheetParseError(source.getName()));
        }
View Full Code Here

TOP

Related Classes of flash.css.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.