info.informatica.doc.dom4j
Class DOM4JCSSStyleSheet

java.lang.Object
  extended by info.informatica.doc.style.css.dom.BaseCSSStyleSheet
      extended by info.informatica.doc.dom4j.DOM4JCSSStyleSheet
All Implemented Interfaces:
Cloneable, org.w3c.dom.css.CSSStyleSheet, org.w3c.dom.stylesheets.StyleSheet

public class DOM4JCSSStyleSheet
extends BaseCSSStyleSheet
implements Cloneable

CSS Style Sheet for DOM4J.

Author:
Carlos Amengual (amengual at informatica.info)

Field Summary
 
Fields inherited from class info.informatica.doc.style.css.dom.BaseCSSStyleSheet
cssRules, currentInsertionIndex, targetMedium
 
Constructor Summary
DOM4JCSSStyleSheet(CSSStyleSheetFactory factory, XHTMLElement ownerElement, org.w3c.dom.stylesheets.MediaList media)
           
DOM4JCSSStyleSheet(CSSStyleSheetFactory factory, XHTMLElement ownerElement, org.w3c.dom.stylesheets.MediaList media, org.w3c.dom.css.CSSRule ownerRule)
           
 
Method Summary
 DOM4JCSSStyleSheet clone()
          Creates and returns a copy of this style sheet.
 org.w3c.dom.css.CSSStyleDeclaration getComputedStyle(CSSStylableElement elm, String pseudoElt)
          Gets the computed style for the given DOM4J element and pseudo-element.
 URL getDocumentBaseURL()
          Gets the base URL for the source document of this sheet
 XHTMLElement getDOM4JOwnerElement()
           
 
Methods inherited from class info.informatica.doc.style.css.dom.BaseCSSStyleSheet
addRule, addStyleSheet, computeStyle, createSACParser, deleteRule, getCssRules, getDisabled, getHref, getMedia, getNamespaceURI, getOwnerNode, getOwnerRule, getParentStyleSheet, getStyleSheetFactory, getTargetMedium, getTitle, getType, insertRule, parseCSSStyleSheet, setDisabled, setHref, setNamespaceURI, setParentStyleSheet, setTargetMedium, setTitle, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DOM4JCSSStyleSheet

public DOM4JCSSStyleSheet(CSSStyleSheetFactory factory,
                          XHTMLElement ownerElement,
                          org.w3c.dom.stylesheets.MediaList media,
                          org.w3c.dom.css.CSSRule ownerRule)

DOM4JCSSStyleSheet

public DOM4JCSSStyleSheet(CSSStyleSheetFactory factory,
                          XHTMLElement ownerElement,
                          org.w3c.dom.stylesheets.MediaList media)
Method Detail

getDocumentBaseURL

public URL getDocumentBaseURL()
Description copied from class: BaseCSSStyleSheet
Gets the base URL for the source document of this sheet

Overrides:
getDocumentBaseURL in class BaseCSSStyleSheet
Returns:
the base URL, or null if this style sheet is not embedded into a source document (i.e. a standalone sheet), or is not known.

getDOM4JOwnerElement

public XHTMLElement getDOM4JOwnerElement()

getComputedStyle

public org.w3c.dom.css.CSSStyleDeclaration getComputedStyle(CSSStylableElement elm,
                                                            String pseudoElt)
Gets the computed style for the given DOM4J element and pseudo-element.

Parameters:
elm - the element.
pseudoElt - the pseudo-element.
Returns:
the computed style declaration.

clone

public DOM4JCSSStyleSheet clone()
Creates and returns a copy of this style sheet.

The copy is a shallow copy (the rule list is new, but the referenced rules are the same as in the cloned object.

Overrides:
clone in class Object
Returns:
a clone of this instance.


Copyright © 2011 informatica.info. All Rights Reserved.