|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dom4j.DocumentFactory
org.dom4j.dom.DOMDocumentFactory
info.informatica.doc.dom4j.XHTMLDocumentFactory
public class XHTMLDocumentFactory
DocumentFactory for CSS-styled XHTML documents.
This factory creates XHTMLDocuments and other objects with support for CSS
style sheets.
A default style sheet can be set with the setDefaultStyleSheet
method. If no default sheet is specified, an internal default sheet will be
used.
It is possible to produce elements with the ability to cache its own
computed style, if you call setStyleCache(true). This should
enhance performance for applicactions that may call the getComputedStyle()
method of a single stylable element several times.
| Nested Class Summary | |
|---|---|
class |
XHTMLDocumentFactory.DOM4JCSSStyleSheetFactory
CSS2 style sheet factory for DOM. |
| Constructor Summary | |
|---|---|
XHTMLDocumentFactory()
|
|
| Method Summary | |
|---|---|
Attribute |
createAttribute(Element owner,
QName qname,
String value)
|
XHTMLDocument |
createDocument()
|
Element |
createElement(QName qname)
|
Element |
createElement(QName qname,
int attributeCount)
|
XHTMLDocumentFactory.DOM4JCSSStyleSheetFactory |
getCSSStyleSheetFactory()
Gets the CSS style sheet factory. |
static DOMDocumentFactory |
getInstance()
|
StyleDatabase |
getStyleDatabase()
|
DOM4JCSSStyleSheet |
getUserAgentStyleSheet()
Gets the User Agent default CSS style sheet to be used by this factory. |
boolean |
isStyleCacheOn()
Indicates whether the stylable elements currently produced by this factory are cache-enabled or not. |
void |
setDefaultStyleSheet(DOM4JCSSStyleSheet styleSheet)
Deprecated. use setUserAgentStyleSheet and setUserStyleSheet. |
void |
setStyleCache(boolean onOff)
Can turn on or off the per-Element style caching capability (by default is off). |
void |
setStyleDatabase(StyleDatabase styleDb)
|
void |
setUserAgentStyleSheet(DOM4JCSSStyleSheet styleSheet)
Sets the default User Agent CSS style sheet to be used in documents created by this factory. |
void |
setUserStyleSheet(DOM4JCSSStyleSheet styleSheet)
Sets the CSS style sheet defined by the end-user. |
| Methods inherited from class org.dom4j.dom.DOMDocumentFactory |
|---|
createCDATA, createComment, createDocType, createDocument, createDocumentType, createEntity, createEntity, createNamespace, createProcessingInstruction, createProcessingInstruction, createText, hasFeature |
| Methods inherited from class org.dom4j.DocumentFactory |
|---|
createAttribute, createDocument, createDocument, createElement, createElement, createPattern, createQName, createQName, createQName, createQName, createXPath, createXPath, createXPathFilter, createXPathFilter, getQNames, getXPathNamespaceURIs, setXPathNamespaceURIs |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.DOMImplementation |
|---|
getFeature |
| Constructor Detail |
|---|
public XHTMLDocumentFactory()
| Method Detail |
|---|
public static DOMDocumentFactory getInstance()
public DOM4JCSSStyleSheet getUserAgentStyleSheet()
public XHTMLDocumentFactory.DOM4JCSSStyleSheetFactory getCSSStyleSheetFactory()
public void setDefaultStyleSheet(DOM4JCSSStyleSheet styleSheet)
setUserAgentStyleSheet and setUserStyleSheet.
styleSheet - the default style sheet.public void setUserAgentStyleSheet(DOM4JCSSStyleSheet styleSheet)
The sheet will be appropriately merged with the non-important part of the user-preference style sheet to provide the document's default sheet.
styleSheet - the user agent style sheet.public void setUserStyleSheet(DOM4JCSSStyleSheet styleSheet)
The supplied sheet should contain user preferences, and will be appropriately merged with the other style sheets.
styleSheet - the user style sheet.public boolean isStyleCacheOn()
public void setStyleCache(boolean onOff)
Only applications that repeatedly call the
CSSStylableElement.getComputedStyle() method on the same
Element should turn it on.
onOff - set to true to turn on the cache capability, to false
to turn it off.public Element createElement(QName qname)
createElement in class DOMDocumentFactory
public Element createElement(QName qname,
int attributeCount)
createElement in class DOMDocumentFactorypublic XHTMLDocument createDocument()
createDocument in class DOMDocumentFactory
public Attribute createAttribute(Element owner,
QName qname,
String value)
createAttribute in class DOMDocumentFactorypublic StyleDatabase getStyleDatabase()
public void setStyleDatabase(StyleDatabase styleDb)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||