1 18 19 package org.apache.batik.css.dom; 20 21 import org.apache.batik.css.engine.CSSEngine; 22 import org.apache.batik.css.engine.CSSStylableElement; 23 import org.w3c.dom.Element ; 24 import org.w3c.dom.css.CSSStyleDeclaration; 25 import org.w3c.dom.css.ViewCSS; 26 import org.w3c.dom.views.DocumentView; 27 28 35 public class CSSOMViewCSS implements ViewCSS { 36 37 40 protected CSSEngine cssEngine; 41 42 45 public CSSOMViewCSS(CSSEngine engine) { 46 cssEngine = engine; 47 } 48 49 53 public DocumentView getDocument() { 54 return (DocumentView)cssEngine.getDocument(); 55 } 56 57 61 public CSSStyleDeclaration getComputedStyle(Element elt, 62 String pseudoElt) { 63 if (elt instanceof CSSStylableElement) { 64 return new CSSOMComputedStyle(cssEngine, 65 (CSSStylableElement)elt, 66 pseudoElt); 67 } 68 return null; 69 } 70 71 } 72 | Popular Tags |