Examples of CSSStyleRule


Examples of org.jfree.layouting.input.style.CSSStyleRule

  public CSSStyleRule[] getMatchingRules(final LayoutElement element)
  {
    final ArrayList retvals = new ArrayList();
    for (int i = 0; i < activeStyleRules.length; i++)
    {
      final CSSStyleRule activeStyleRule = activeStyleRules[i];
      final CSSSelector selector = activeStyleRule.getSelector();
      if (selector == null)
      {
        continue;
      }
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

        final InputSource source = new InputSource();
        source.setCharacterStream(new StringReader(selector));

        handler.initParseContext(source);
        handler.setStyleRule(new CSSStyleRule(null, null));
        parser.setDocumentHandler(handler);

        final SelectorList selectorList = parser.parseSelectors(source);
        CSSParserContext.getContext().destroy();
        return selectorList;
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

        final InputSource source = new InputSource();
        source.setCharacterStream(new StringReader(value));

        handler.initParseContext(source);
        handler.setStyleRule(new CSSStyleRule(null, null));
        parser.setDocumentHandler(handler);
        final LexicalUnit lu = parser.parsePropertyValue(source);
        handler.property(key.getName(), lu, false);
        final CSSStyleRule rule = (CSSStyleRule) handler.getStyleRule();

        CSSParserContext.getContext().destroy();

        return rule.getPropertyCSSValue(key);
      }
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

                                  final String value,
                                  final ResourceManager resourceManager,
                                  final ResourceKey baseURL)
  {
    return parseStyles(namespaces, name, value, resourceManager,
        baseURL, new CSSStyleRule(null, null));
  }
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

        handler.initParseContext(source);
        handler.setStyleRule(baseRule);
        parser.setDocumentHandler(handler);
        final LexicalUnit lu = parser.parsePropertyValue(source);
        handler.property(name, lu, false);
        final CSSStyleRule rule = (CSSStyleRule) handler.getStyleRule();

        CSSParserContext.getContext().destroy();
        return rule;
      }
    }
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

      final InputSource inputSource = new InputSource();
      inputSource.setByteStream(data.getResourceAsStream(manager));

      handler.initParseContext(inputSource);
      handler.setStyleRule(new CSSStyleRule(null, null));
      parser.parseStyleDeclaration(inputSource);

      final DependencyCollector dependencies = handler.getDependencies();
      if (context != null)
      {
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

   * A datasource is assigned with this element is set to a default source,
   * which always returns null.
   */
  protected Element()
  {
    this.style = new CSSStyleRule(null, null);
    this.attributes = new AttributeMap();
    this.enabled = true;
    setNamespace(JFreeReportInfo.REPORT_NAMESPACE);
  }
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

   * @throws ClassCastException if the arguments' types prevent them from being
   *                            compared by this Comparator.
   */
  public int compare(final Object o1, final Object o2)
  {
    final CSSStyleRule r1 = (CSSStyleRule) o1;
    final CSSStyleRule r2 = (CSSStyleRule) o2;

    final CSSSelector selector1 = r1.getSelector();
    final CSSSelector selector2 = r2.getSelector();

    final SelectorWeight weight1 = selector1.getWeight();
    final SelectorWeight weight2 = selector2.getWeight();

    return weight1.compareTo(weight2);
View Full Code Here

Examples of org.jfree.layouting.input.style.CSSStyleRule

    // sort ...
    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.jfree.layouting.input.style.CSSStyleRule

        counterRules.toArray(new CSSCounterRule[counterRules.size()]);

    styleRules.clear();
    for (int i = 0; i < activeStyleRules.length; i++)
    {
      final CSSStyleRule activeStyleRule = activeStyleRules[i];
      if (isPseudoElementRule(activeStyleRule) == false)
      {
        continue;
      }
      styleRules.add(activeStyleRule);
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.