|
||||||||||
| 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. |
| Field Summary | |
|---|---|
protected static XHTMLDocumentFactory |
singleton
|
| Fields inherited from class org.dom4j.DocumentFactory |
|---|
cache |
| Constructor Summary | |
|---|---|
XHTMLDocumentFactory()
|
|
| Method Summary | |
|---|---|
org.dom4j.Attribute |
createAttribute(org.dom4j.Element owner,
org.dom4j.QName qname,
String value)
|
XHTMLDocument |
createDocument()
|
org.dom4j.Element |
createElement(org.dom4j.QName qname)
|
org.dom4j.Element |
createElement(org.dom4j.QName qname,
int attributeCount)
|
XHTMLDocumentFactory.DOM4JCSSStyleSheetFactory |
getCSSStyleSheetFactory()
Gets the CSS style sheet factory. |
protected DOM4JCSSStyleSheet |
getDefaultStyleSheet()
|
static org.dom4j.dom.DOMDocumentFactory |
getInstance()
|
StyleDatabase |
getStyleDatabase()
|
DOM4JCSSStyleSheet |
getUserAgentStyleSheet()
Gets the User Agent default CSS style sheet to be used by this factory. |
protected BaseCSSStyleDeclaration |
getUserImportantStyle()
|
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 |
|---|
asDocumentType, 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, createQNameCache, createSingleton, createXPath, createXPath, createXPathFilter, createXPathFilter, getQNames, getXPathNamespaceURIs, init, intern, setXPathNamespaceURIs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.DOMImplementation |
|---|
getFeature |
| Field Detail |
|---|
protected static transient XHTMLDocumentFactory singleton
| Constructor Detail |
|---|
public XHTMLDocumentFactory()
| Method Detail |
|---|
public static org.dom4j.dom.DOMDocumentFactory getInstance()
public DOM4JCSSStyleSheet getUserAgentStyleSheet()
protected DOM4JCSSStyleSheet getDefaultStyleSheet()
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.protected BaseCSSStyleDeclaration getUserImportantStyle()
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 org.dom4j.Element createElement(org.dom4j.QName qname)
createElement in class org.dom4j.dom.DOMDocumentFactory
public org.dom4j.Element createElement(org.dom4j.QName qname,
int attributeCount)
createElement in class org.dom4j.dom.DOMDocumentFactorypublic XHTMLDocument createDocument()
createDocument in class org.dom4j.dom.DOMDocumentFactory
public org.dom4j.Attribute createAttribute(org.dom4j.Element owner,
org.dom4j.QName qname,
String value)
createAttribute in class org.dom4j.dom.DOMDocumentFactorypublic StyleDatabase getStyleDatabase()
public void setStyleDatabase(StyleDatabase styleDb)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||