Package com.adobe.dp.css

Examples of com.adobe.dp.css.InlineRule


        break;
      cls = className + (count++);
    }
    classByProps.put(props, cls);
    SelectorRule rule = css.getRuleForSelector(selector, true);
    InlineRule p = props.getProperties().getPropertySet();
    Iterator ps = p.properties();
    while (ps.hasNext()) {
      String pn = (String) ps.next();
      CSSValue pv = p.get(pn);
      rule.set(pn, pv);
    }
    return cls;
  }
View Full Code Here


      element.setId(id);
    String className = attributes.getValue("class");
    if (className != null)
      element.setClassName(className);
    String styleStr = attributes.getValue("style");
    InlineRule style = null;
    if (styleStr != null) {
      CSSParser parser = new CSSParser();
      parser.setCSSURLFactory(new EPUBCSSURLFactory(document.resource));
      style = parser.readInlineStyle(styleStr);
    }
View Full Code Here

  }

  public Object getCascadedProperty(String propName) {

    // style attribute: highest specificity
    InlineRule style = getStyle();
    if (style != null) {
      Object value = style.get(propName);
      if (value != null)
        return value;
    }

    // CSS cascade from stylesheets
View Full Code Here

    return cascade;
  }

  public void setDesiredCascadeResult(InlineRule s) {
    CascadeResult cr = new CascadeResult();
    InlineRule t = cr.getProperties().getPropertySet();
    if (s != null) {
      Iterator it = s.properties();
      if (it != null) {
        while (it.hasNext()) {
          String p = (String) it.next();
          CSSValue value = s.get(p);
          t.set(p, value);
        }
      }
    }
    setDesiredCascadeResult(cr);
  }
View Full Code Here

  }

  private void processCascadeResult(CascadeResult cascade) {
    // TODO: other media?
    if (cascade != null) {
      InlineRule rule = cascade.getProperties().getPropertySet();
      processRule(rule);
    }
  }
View Full Code Here

TOP

Related Classes of com.adobe.dp.css.InlineRule

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.