Package flash.css

Examples of flash.css.StyleProperty


    private void processFontFamily(Map<String, StyleProperty> properties, Descriptor descriptor)
    {
        String propertyName = "fontFamily";
        String fontFamily = descriptor.getIdentAsString();
        StyleProperty stylesProperty = new StyleProperty(propertyName,
                                                         "\"" + fontFamily + "\"",
                                                         descriptor.getPath(),
                                                         descriptor.getLineNumber());
        properties.put(propertyName, stylesProperty);
    }
View Full Code Here


        Object value = processPropertyValue(descriptor);       

        if (value != null)
        {
            StyleProperty styleProperty = new StyleProperty(propertyName, value,
                                                            descriptor.getPath(),
                                                            descriptor.getLineNumber());
            properties.put(propertyName, styleProperty);
        }
    }
View Full Code Here

    private StatementListNode generateStyleProperties(StatementListNode statementList, Iterator<StyleProperty> iterator)
    {
        while (iterator.hasNext())
        {
            StyleProperty styleProperty = iterator.next();
            //this.${style.name} = ${style.value};
            /*
            ThisExpressionNode base = nodeFactory.thisExpression(-1);
            IdentifierNode identifier = nodeFactory.identifier(styleProperty.getName());
            ArgumentListNode argumentList = nodeFactory.argumentList(null, );
            SetExpressionNode selector = nodeFactory.setExpression(identifier,
                                                                   argumentList, false);
            selector.setRValue(false);
            MemberExpressionNode memberExpression = nodeFactory.memberExpression(base, selector);
            ListNode list = nodeFactory.list(null, memberExpression);
            ExpressionStatementNode expressionStatement = nodeFactory.expressionStatement(list);
            */
            // This is a temporary hack.  We should be able to
            // generate Nodes directly for a StyleProperty.
            String text = ("this." + styleProperty.getName() + " = " + styleProperty.getValue());
            int lineNumber = styleProperty.getLineNumber();
            List<Node> nodeList =
                AbstractSyntaxTreeUtil.parseExpression(context, configNamespaces, text,
                                                       lineNumber, generateDocComments);
           
            assert nodeList.size() == 1;
View Full Code Here

                for (StyleDeclaration styleDeclaration : declarations.values())
                {
                    Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                    for (StyleDeclarationBlock block : blocks)
                    {
                        StyleProperty styleProperty = block.getProperties().get("backgroundColor");
   
                        if (styleProperty != null)
                        {
                            Object value = styleProperty.getValue();
   
                            if (value instanceof String)
                            {
                                String backgroundColor = (String) value;
   
                                try
                                {
                                    result = Integer.decode(backgroundColor).intValue();
                                }
                                catch (NumberFormatException numberFormatException)
                                {
                                    ThreadLocalToolkit.log(new InvalidBackgroundColor(backgroundColor),
                                                           styleDeclaration.getPath(),
                                                           styleProperty.getLineNumber());
                                }
                            }
                            // If value is not a String an error will have been reported upstream.
                        }
                    }
View Full Code Here

                                    styleCondition.getValue().equals(styleName))
                                {
                                    Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                                    for (StyleDeclarationBlock block : blocks)
                                    {
                                        StyleProperty styleProperty = block.getProperties().get("backgroundColor");
   
                                        if (styleProperty != null)
                                        {
                                            Object value = styleProperty.getValue();
   
                                            if (value instanceof String)
                                            {
                                                String backgroundColor = (String) value;
   
                                                try
                                                {
                                                    result = Integer.decode(backgroundColor).intValue();
                                                }
                                                catch (NumberFormatException numberFormatException)
                                                {
                                                    ThreadLocalToolkit.log(new InvalidBackgroundColor(backgroundColor),
                                                                           styleDeclaration.getPath(),
                                                                           styleProperty.getLineNumber());
                                                }
                                            }
                                            // If value is not a String an error will have been reported upstream.
                                        }
                                    }
View Full Code Here

            for (StyleDeclaration styleDeclaration : styleDef.getDeclarations().values())
            {
                Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                for (StyleDeclarationBlock block : blocks)
                {
                    StyleProperty styleProperty = block.getProperties().get("styleName");
   
                    if (styleProperty != null)
                    {
                        Object value = styleProperty.getValue();
   
                        if (value instanceof String)
                        {
                            result = (String) value;
                        }
View Full Code Here

    private void processFontFamily(Map<String, StyleProperty> properties, Descriptor descriptor)
    {
        String propertyName = "fontFamily";
        String fontFamily = descriptor.getIdentAsString();
        StyleProperty stylesProperty = new StyleProperty(propertyName,
                                                         "\"" + fontFamily + "\"",
                                                         descriptor.getPath(),
                                                         descriptor.getLineNumber());
        properties.put(propertyName, stylesProperty);
    }
View Full Code Here

        Object value = processPropertyValue(descriptor);       

        if (value != null)
        {
            StyleProperty styleProperty = new StyleProperty(propertyName, value,
                                                            descriptor.getPath(),
                                                            descriptor.getLineNumber());
            properties.put(propertyName, styleProperty);
        }
    }
View Full Code Here

                for (StyleDeclaration styleDeclaration : declarations.values())
                {
                    Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                    for (StyleDeclarationBlock block : blocks)
                    {
                        StyleProperty styleProperty = block.getProperties().get("backgroundColor");
   
                        if (styleProperty != null)
                        {
                            Object value = styleProperty.getValue();
   
                            if (value instanceof String)
                            {
                                String backgroundColor = (String) value;
   
                                try
                                {
                                    result = Integer.decode(backgroundColor).intValue();
                                }
                                catch (NumberFormatException numberFormatException)
                                {
                                    ThreadLocalToolkit.log(new InvalidBackgroundColor(backgroundColor),
                                                           styleDeclaration.getPath(),
                                                           styleProperty.getLineNumber());
                                }
                            }
                            // If value is not a String an error will have been reported upstream.
                        }
                    }
View Full Code Here

                                    styleCondition.getValue().equals(styleName))
                                {
                                    Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                                    for (StyleDeclarationBlock block : blocks)
                                    {
                                        StyleProperty styleProperty = block.getProperties().get("backgroundColor");
   
                                        if (styleProperty != null)
                                        {
                                            Object value = styleProperty.getValue();
   
                                            if (value instanceof String)
                                            {
                                                String backgroundColor = (String) value;
   
                                                try
                                                {
                                                    result = Integer.decode(backgroundColor).intValue();
                                                }
                                                catch (NumberFormatException numberFormatException)
                                                {
                                                    ThreadLocalToolkit.log(new InvalidBackgroundColor(backgroundColor),
                                                                           styleDeclaration.getPath(),
                                                                           styleProperty.getLineNumber());
                                                }
                                            }
                                            // If value is not a String an error will have been reported upstream.
                                        }
                                    }
View Full Code Here

TOP

Related Classes of flash.css.StyleProperty

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.