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

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


    {
      if (i != 0)
      {
        b.append(", ");
      }
      final CSSSelector selector = rule.getSelector(i);
      b.append(selector.print(nc));
    }
    return b.toString();
  }
View Full Code Here


        final SelectorList list = StyleSheetParserUtil.getInstance().parseSelector(nc, selectorText);
        styleRule.clearSelectors();
        textField.setBackground(color);
        for (int i = 0; i < list.getLength(); i++)
        {
          final CSSSelector selector = (CSSSelector) list.item(i);
          styleRule.addSelector(selector);
        }

        pane.setTitle(Messages.getString("StyleDefinitionEditorDialog.RuleTitle", selectorText));
      }
View Full Code Here

    {
      final StyleSelectorReadHandler readHandler = selectorReadHandlers.get(i);
      final List<CSSSelector> object = readHandler.getObject();
      for (int j = 0; j < object.size(); j++)
      {
        final CSSSelector cssSelector = object.get(j);
        styleRule.addSelector(cssSelector);
      }
    }
  }
View Full Code Here

  {
    final NamespaceCollection namespaceCollection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
    final SelectorList selectorList = StyleSheetParserUtil.getInstance().parseSelector(namespaceCollection, "h1.test[x-lang=\"fr'\\\"\"]");
    for (int i = 0; i < selectorList.getLength(); i+= 1)
    {
      CSSSelector item = (CSSSelector) selectorList.item(i);
      System.out.println (item.print(namespaceCollection));
    }
  }
View Full Code Here

  {
    final NamespaceCollection namespaceCollection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
    final SelectorList selectorList = StyleSheetParserUtil.getInstance().parseSelector(namespaceCollection, ".\\aa  test");
    for (int i = 0; i < selectorList.getLength(); i+= 1)
    {
      CSSSelector item = (CSSSelector) selectorList.item(i);
      System.out.println (item.print(namespaceCollection));
    }
  }
View Full Code Here

  private boolean isPseudoElementRule(final ElementStyleRule rule)
  {
    final List<CSSSelector> selectorList = rule.getSelectorList();
    for (int i = 0; i < selectorList.size(); i += 1)
    {
      final CSSSelector selector = selectorList.get(i);
      if (selector == null)
      {
        continue;
      }

      if (selector.getSelectorType() != Selector.SAC_CONDITIONAL_SELECTOR)
      {
        continue;
      }

      final ConditionalSelector cs = (ConditionalSelector) selector;
View Full Code Here

    {
      final ElementStyleRule activeStyleRule = activePseudoStyleRules[i];
      final List<CSSSelector> selectorList = activeStyleRule.getSelectorList();
      for (int x = 0; x < selectorList.size(); x += 1)
      {
        final CSSSelector selector = selectorList.get(x);
        if (selector instanceof ConditionalSelector == false)
        {
          continue;
        }
View Full Code Here

      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();
            }
          }
        }
      }
      if (weight != null)
View Full Code Here

TOP

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

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.