Examples of CSSStyleRule


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

    for (int i = 0; i < rc; i++)
    {
      final StyleRule rule = styleSheet.getRule(i);
      if (rule instanceof CSSStyleRule)
      {
        final CSSStyleRule drule = (CSSStyleRule) rule;
        activeStyleRules.add(drule);
      }
    }
  }
View Full Code Here

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

  public boolean isMatchingPseudoElement(final LayoutElement element, final String pseudo)
  {
    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

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

   * 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

        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.pentaho.reporting.libraries.css.model.CSSStyleRule

   *                      exception.
   */
  public void startSelector(SelectorList selectors)
      throws CSSException
  {
    styleRule = new CSSStyleRule(styleSheet, getParentRule());
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.model.CSSStyleRule

    for (int i = 0; i < length; i++)
    {
      final Selector selector = selectors.item(i);
      try
      {
        final CSSStyleRule rule = (CSSStyleRule) styleRule.clone();
        rule.setSelector((CSSSelector) selector);
        styleSheet.addRule(rule);
      }
      catch (CloneNotSupportedException e)
      {
        // should not happen
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.model.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.pentaho.reporting.libraries.css.model.CSSStyleRule

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

        handler.initParseContext(source);
        handler.setStyleRule(new CSSStyleRule(new StyleSheet(), 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
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.