Package org.apache.flex.compiler.css

Examples of org.apache.flex.compiler.css.ICSSSelector


    {
        assert site instanceof ICSSSelector : "Expected a 'selector' node, but got '" + site.getClass().getName() + "'.";

        final InstructionList arrayInstructions = new InstructionList();
        final List<String> resolvedSimpleSelectorNames = new ArrayList<String>();
        final ICSSSelector selectorNode = (ICSSSelector)site;
        final ImmutableList<ICSSSelector> selectors = CSSSelector.getCombinedSelectorList(selectorNode);
        for (final ICSSSelector selector : selectors)
        {
            final String selectorLiteral = getSelecterLiteralForABC(selector);
View Full Code Here


        final ImmutableSet.Builder<ICSSSelector> builder = new ImmutableSet.Builder<ICSSSelector>();
        for (final ICSSRule rule : document.getRules())
        {
            for (final ICSSSelector subject : rule.getSelectorGroup())
            {
                ICSSSelector selector = subject;
                while (selector != null)
                {
                    builder.add(selector);
                    if (selector.getCombinator() != null)
                        selector = selector.getCombinator().getSelector();
                    else
                        selector = null;
                }
            }
        }
View Full Code Here

  protected CSSCombinator getCSSCombinator(String code) {
    List<ICSSSelector> selectors =  getCSSSelectors( code );
    assertThat("selectors", selectors,  not( (List<ICSSSelector>) null) );
    assertThat("selectors.size()", selectors.size(),  is( 1 ) );

    ICSSSelector selector = selectors.get(0);
    assertThat("selector", selector,  not( (ICSSSelector) null) );

    return (CSSCombinator) selector.getCombinator();
  }
View Full Code Here

    //TODO why CSSCombinator doesn't extend CSSNodeBase??
    assertThat("combinator.getOperator()" , combinator.getOperator(), is( CSSModelTreeType.COMBINATOR ) );
    assertThat("combinator.getCombinatorType()" , combinator.getCombinatorType(), is(CombinatorType.DESCENDANT) );
    assertThat("combinator.getSelector()" , combinator.getSelector(), not( (ICSSSelector) null) );
   
    ICSSSelector selector = combinator.getSelector();
    assertThat("selector.getElementName()" , selector.getElementName(), is( "VBox" ) );
    assertThat("selector.getNamespacePrefix()" , selector.getNamespacePrefix(), is( "s" ) );
    assertThat("selector.getCombinator()" , selector.getCombinator(), is( (ICSSCombinator) null) );
  }
View Full Code Here

    CSSCombinator combinator = getCSSCombinator(code);
    assertThat("combinator.getOperator()" , combinator.getOperator(), is( CSSModelTreeType.COMBINATOR ) );
    assertThat("combinator.getCombinatorType()" , combinator.getCombinatorType(), is(CombinatorType.DESCENDANT) );
    assertThat("combinator.getSelector()" , combinator.getSelector(), not( (ICSSSelector) null) );
   
    ICSSSelector selector1 = combinator.getSelector();
    assertThat("selector1.getElementName()" , selector1.getElementName(), is( "HBox" ) );
    assertThat("selector1.getNamespacePrefix()" , selector1.getNamespacePrefix(), is( "s" ) );
    assertThat("selector1.getCombinator()" , selector1.getCombinator(), not( (ICSSCombinator) null) );
    assertThat("selector1.getCombinator().getSelector()" , selector1.getCombinator().getSelector(), not( (ICSSSelector) null) );
   

    ICSSSelector selector2 = selector1.getCombinator().getSelector();
    assertThat("selector2.getElementName()" , selector2.getElementName(), is( "VBox" ) );
    assertThat("selector2.getNamespacePrefix()" , selector2.getNamespacePrefix(), is( "s" ) );
    assertThat("selector2.getCombinator()" , selector2.getCombinator(), is( (ICSSCombinator) null) );
   

  }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.css.ICSSSelector

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.