Examples of ICSSSelector


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

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

        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

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

  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

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

    //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

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

    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

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelector

      ICSSSelectorList list = style.getSelectors();
      int nSelectors = list.getLength();
      int maxSpecificity = -1;
      for (int iSelector = 0; iSelector < nSelectors; iSelector++) {
        // Check each Selector Lists
        ICSSSelector selector = list.getSelector(iSelector);
        int specificity = selector.getSpecificity();
        if (maxSpecificity < specificity && selector.match(element, pseudoName)) {
          maxSpecificity = specificity;
        }
      }
      if (maxSpecificity >= 0) {
        // apply this style to the element
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.