Package org.pentaho.reporting.engine.classic.core.style.css.selector

Examples of org.pentaho.reporting.engine.classic.core.style.css.selector.SelectorWeight


    final SelectorWeight[] weights = new SelectorWeight[target.getPropertyKeys().length];
    for (int i = 0; i < activeStyleRules.length; i++)
    {
      final StyleRuleMatcher.MatcherResult activeStyleRule = activeStyleRules[i];
      final ElementStyleRule rule = activeStyleRule.getRule();
      final SelectorWeight weight = activeStyleRule.getWeight();

      final StyleKey[] definedPropertyNamesArray = rule.getDefinedPropertyNamesArray();
      for (int j = 0; j < definedPropertyNamesArray.length; j++)
      {
        final StyleKey styleKey = definedPropertyNamesArray[j];
        if (styleKey == null)
        {
          continue;
        }
       
        final SelectorWeight selectorWeight = weights[j];
        if (selectorWeight == null || (selectorWeight.compareTo(weight) > 0))
        {
          final Object styleProperty = rule.getStyleProperty(styleKey);
          if (styleProperty != null)
          {
            target.setStyleProperty(styleKey, styleProperty);
View Full Code Here


    final ArrayList<MatcherResult> retvals = new ArrayList<MatcherResult>();
    for (int i = 0; i < activeStyleRules.length; i++)
    {
      final ElementStyleRule activeStyleRule = activeStyleRules[i];
      final List<CSSSelector> selectorList = activeStyleRule.getSelectorList();
      SelectorWeight weight = null;

      for (int x = 0; x < selectorList.size(); x += 1)
      {
        final CSSSelector selector = selectorList.get(x);
        if (selector == null)
        {
          continue;
        }

        if (isMatch(element, selector))
        {
          if (weight == null)
          {
            weight = selector.getWeight();
          }
          else
          {
            if (weight.compareTo(selector.getWeight()) < 0)
            {
              weight = selector.getWeight();
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.style.css.selector.SelectorWeight

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.