Package com.adobe.dp.css

Examples of com.adobe.dp.css.CascadeEngine


    newDoc.body = newBody;
    return true;
  }

  public void cascadeStyles() {
    CascadeEngine engine = new CascadeEngine();
    Iterator s = styleResources();
    while (s.hasNext()) {
      ResourceRef ref = (ResourceRef) s.next();
      Resource r = ref.getResource();
      if (r instanceof StyleResource) {
        StyleResource sr = (StyleResource) r;
        Stylesheet stylesheet = sr.getStylesheet();
        if (stylesheet != null) {
          CSSStylesheet css = stylesheet.getCSS();
          if (css != null)
            engine.add(css, null);
        }
      }
    }

    // TODO: SVG style elements

    boolean notSVG = resource.getMediaType().equals("image/svg+xml");
    if (notSVG) {
      engine.pushElement(xhtmlns, "html", null);
      engine.pushElement(xhtmlns, "head", null);
      engine.popElement();
    }
    getBody().cascade(engine);
    if (notSVG) {
      engine.popElement();
    }
  }
View Full Code Here

TOP

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

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.