Examples of CssSelector


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

        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

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

    {
      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

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

  {
    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

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

  {
    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

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

  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

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

    {
      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

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

      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

Examples of org.pentaho.reporting.libraries.css.selectors.CSSSelector

    Arrays.sort(activeStyleRules, new CSSStyleRuleComparator());
    SelectorWeight oldSelectorWeight = null;
    for (int i = 0; i < activeStyleRules.length; i++)
    {
      final CSSStyleRule activeStyleRule = activeStyleRules[i];
      final CSSSelector selector = activeStyleRule.getSelector();
      final SelectorWeight activeWeight = selector.getWeight();

      if (oldSelectorWeight != null)
      {
        if (oldSelectorWeight.compareTo(activeWeight) > 0)
        {
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.selectors.CSSSelector

    return null;
  }

  private boolean isPseudoElementRule(final CSSStyleRule rule)
  {
    final CSSSelector selector = rule.getSelector();
    if (selector == null)
    {
      return false;
    }

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

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

Examples of org.pentaho.reporting.libraries.css.selectors.CSSSelector

  {
    for (int i = 0; i < activePseudoStyleRules.length; i++)
    {
      final CSSStyleRule activeStyleRule = activePseudoStyleRules[i];

      final CSSSelector selector = activeStyleRule.getSelector();
      final ConditionalSelector cs = (ConditionalSelector) selector;
      final Condition condition = cs.getCondition();

      final AttributeCondition ac = (AttributeCondition) condition;
      if (ObjectUtilities.equal(ac.getValue(), pseudo) == false)
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.