org.lobobrowser.html.domimpl
Class HTMLDocumentImpl

java.lang.Object
  extended by org.lobobrowser.js.AbstractScriptableDelegate
      extended by org.lobobrowser.html.domimpl.NodeImpl
          extended by org.lobobrowser.html.domimpl.HTMLDocumentImpl
All Implemented Interfaces:
ModelNode, ScriptableDelegate, org.w3c.dom.Document, HTMLDocument, org.w3c.dom.Node, DocumentView

public class HTMLDocumentImpl
extends NodeImpl
implements HTMLDocument, DocumentView

Implementation of the W3C HTMLDocument interface.


Nested Class Summary
 class HTMLDocumentImpl.CSSStyleSheetList
           
 
Field Summary
 
Fields inherited from class org.lobobrowser.html.domimpl.NodeImpl
document, nodeList, notificationsSuspended, parentNode, treeLock, uiNode
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
HTMLDocumentImpl(HtmlRendererContext rcontext)
           
HTMLDocumentImpl(UserAgentContext ucontext)
           
HTMLDocumentImpl(UserAgentContext ucontext, HtmlRendererContext rcontext, WritableLineReader reader, java.lang.String documentURI)
           
 
Method Summary
 void addDocumentNotificationListener(DocumentNotificationListener listener)
          Adds a document notification listener, which is informed about changes to the document.
 org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
           
 void allInvalidated()
           
 void close()
          Closes a document stream opened by open() and forces rendering.
 org.w3c.dom.Attr createAttribute(java.lang.String name)
           
 org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
           
 org.w3c.dom.Comment createComment(java.lang.String data)
           
 org.w3c.dom.DocumentFragment createDocumentFragment()
           
 org.w3c.dom.Element createElement(java.lang.String tagName)
           
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
           
 org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
           
protected  RenderState createRenderState(RenderState prevRenderState)
           
protected  org.w3c.dom.Node createSimilarNode()
          Should create a node with some cloned properties, like the node name, but not attributes or children.
 org.w3c.dom.Text createTextNode(java.lang.String data)
           
 void externalScriptLoading(NodeImpl node)
           
 HTMLCollection getAnchors()
          A collection of all the anchor (A) elements in a document with a value for the name attribute.
 HTMLCollection getApplets()
          A collection of all the OBJECT elements that include applets and APPLET (deprecated) elements in a document.
 java.lang.String getBaseURI()
           
 HTMLElement getBody()
          The element that contains the content for the document.
 java.lang.String getCookie()
          This mutable string attribute denotes persistent state information that (1) is associated with the current frame or document and (2) is composed of information described by the cookies non-terminal of [IETF RFC 2965], Section 4.2.2.
 java.lang.String getDefaultTarget()
           
 AbstractView getDefaultView()
          The default AbstractView for this Document, or null if none available.
 org.w3c.dom.DocumentType getDoctype()
           
 org.w3c.dom.Element getDocumentElement()
           
 java.lang.String getDocumentURI()
           
 java.net.URL getDocumentURL()
           
 java.lang.String getDomain()
          The domain name of the server that served the document, or null if the server cannot be identified by a domain name.
 org.w3c.dom.DOMConfiguration getDomConfig()
           
 org.w3c.dom.Element getElementById(java.lang.String elementId)
           
 org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
          Gets the collection of elements whose name attribute is elementName.
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
          Gets all elements that match the given tag name.
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
           
 HTMLCollection getForms()
          A collection of all the forms of a document.
 HTMLCollection getFrames()
           
 java.net.URL getFullURL(java.lang.String uri)
           
 HtmlRendererContext getHtmlRendererContext()
           
 HTMLCollection getImages()
          A collection of all the IMG elements in a document.
 org.w3c.dom.DOMImplementation getImplementation()
           
 java.lang.String getInputEncoding()
           
 HTMLCollection getLinks()
          A collection of all AREA elements and anchor ( A) elements in a document with a value for the href attribute.
 java.util.Set getLocales()
          Gets an immutable set of locales previously set for this document.
 java.lang.String getLocalName()
           
 Location getLocation()
           
 java.lang.String getNodeName()
           
 short getNodeType()
           
 java.lang.String getNodeValue()
           
 org.mozilla.javascript.Function getOnloadHandler()
           
 java.lang.String getReferrer()
          Returns the URI [IETF RFC 2396] of the page that linked to this page.
 boolean getStrictErrorChecking()
           
 java.util.Collection getStyleSheets()
           
 java.lang.String getTextContent()
          Gets the text content of this node and its descendents.
 java.lang.String getTitle()
          The title of a document as specified by the TITLE element in the head of the document.
 java.lang.String getURL()
          The absolute URI [IETF RFC 2396] of the document.
 UserAgentContext getUserAgentContext()
           
 java.lang.String getXmlEncoding()
           
 boolean getXmlStandalone()
           
 java.lang.String getXmlVersion()
           
 org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep)
           
 void invalidated(NodeImpl node)
          This is called when the node has changed, but it is unclear if it's a size change or a look change.
 void load()
          Loads the document from the reader provided when it was constructed.
 void load(boolean closeReader)
           
protected  void loadImage(java.lang.String relativeUri, ImageListener imageListener)
          Loads images asynchronously such that they are shared if loaded simultaneously from the same URI.
 void lookInvalidated(NodeImpl node)
          Called if something such as a color or decoration has changed.
 org.w3c.dom.Element namedItem(java.lang.String name)
           
 void nodeLoaded(NodeImpl node)
           
 void normalizeDocument()
           
 void open()
          Open a document stream for writing.
 void positionInParentInvalidated(NodeImpl node)
          Changed if the position of the node in a parent has changed.
 void removeDocumentNotificationListener(DocumentNotificationListener listener)
           
 org.w3c.dom.Node renameNode(org.w3c.dom.Node n, java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 void setBaseURI(java.lang.String value)
           
 void setBody(HTMLElement body)
          The element that contains the content for the document.
 void setCookie(java.lang.String cookie)
          This mutable string attribute denotes persistent state information that (1) is associated with the current frame or document and (2) is composed of information described by the cookies non-terminal of [IETF RFC 2965], Section 4.2.2.
 void setDefaultTarget(java.lang.String value)
           
 void setDoctype(org.w3c.dom.DocumentType doctype)
           
 void setDocumentURI(java.lang.String documentURI)
           
 void setDomain(java.lang.String domain)
           
 void setLocales(java.util.Set locales)
          Sets the locales of the document.
 void setLocation(java.lang.String location)
           
 void setNodeValue(java.lang.String nodeValue)
           
 void setOnloadHandler(org.mozilla.javascript.Function onloadHandler)
           
 void setReferrer(java.lang.String value)
           
 void setStrictErrorChecking(boolean strictErrorChecking)
           
 void setTextContent(java.lang.String textContent)
           
 void setTitle(java.lang.String title)
          The title of a document as specified by the TITLE element in the head of the document.
 java.lang.Object setUserData(java.lang.String key, java.lang.Object data, org.w3c.dom.UserDataHandler handler)
           
 void setXmlStandalone(boolean xmlStandalone)
           
 void setXmlVersion(java.lang.String xmlVersion)
           
 void sizeInvalidated(NodeImpl node)
           
 void structureInvalidated(NodeImpl node)
          This is called when children of the node might have changed.
 void write(java.lang.String text)
          Write a string of text to a document stream opened by open().
 void writeln(java.lang.String text)
          Write a string of text followed by a newline character to a document stream opened by open().
 
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, cloneNode, compareDocumentPosition, equalAttributes, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getAttributes, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getFeature, getFirstChild, getInnerHTML, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getUINode, getUserData, hasAttributes, hasChildNodes, informExternalScriptLoading, informInvalid, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setPrefix, setUINode, toString, warn, warn
 
Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate
getScriptable, setScriptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix
 

Constructor Detail

HTMLDocumentImpl

public HTMLDocumentImpl(HtmlRendererContext rcontext)

HTMLDocumentImpl

public HTMLDocumentImpl(UserAgentContext ucontext)

HTMLDocumentImpl

public HTMLDocumentImpl(UserAgentContext ucontext,
                        HtmlRendererContext rcontext,
                        WritableLineReader reader,
                        java.lang.String documentURI)
Method Detail

getLocales

public java.util.Set getLocales()
Gets an immutable set of locales previously set for this document.


setLocales

public void setLocales(java.util.Set locales)
Sets the locales of the document. This helps determine whether specific fonts can display text in the languages of all the locales.

Parameters:
locales - An immutable set of java.util.Locale instances.

getDocumentURL

public java.net.URL getDocumentURL()
Overrides:
getDocumentURL in class NodeImpl

getBaseURI

public java.lang.String getBaseURI()
Specified by:
getBaseURI in interface org.w3c.dom.Node
Overrides:
getBaseURI in class NodeImpl

setBaseURI

public void setBaseURI(java.lang.String value)

getDefaultTarget

public java.lang.String getDefaultTarget()

setDefaultTarget

public void setDefaultTarget(java.lang.String value)

getDefaultView

public AbstractView getDefaultView()
Description copied from interface: DocumentView
The default AbstractView for this Document, or null if none available.

Specified by:
getDefaultView in interface DocumentView

getTextContent

public java.lang.String getTextContent()
                                throws org.w3c.dom.DOMException
Description copied from class: NodeImpl
Gets the text content of this node and its descendents.

Specified by:
getTextContent in interface org.w3c.dom.Node
Overrides:
getTextContent in class NodeImpl
Throws:
org.w3c.dom.DOMException

setTextContent

public void setTextContent(java.lang.String textContent)
                    throws org.w3c.dom.DOMException
Specified by:
setTextContent in interface org.w3c.dom.Node
Overrides:
setTextContent in class NodeImpl
Throws:
org.w3c.dom.DOMException

getTitle

public java.lang.String getTitle()
Description copied from interface: HTMLDocument
The title of a document as specified by the TITLE element in the head of the document.

Specified by:
getTitle in interface HTMLDocument

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: HTMLDocument
The title of a document as specified by the TITLE element in the head of the document.

Specified by:
setTitle in interface HTMLDocument

getReferrer

public java.lang.String getReferrer()
Description copied from interface: HTMLDocument
Returns the URI [IETF RFC 2396] of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).

Specified by:
getReferrer in interface HTMLDocument

setReferrer

public void setReferrer(java.lang.String value)

getDomain

public java.lang.String getDomain()
Description copied from interface: HTMLDocument
The domain name of the server that served the document, or null if the server cannot be identified by a domain name.

Specified by:
getDomain in interface HTMLDocument

setDomain

public void setDomain(java.lang.String domain)

getBody

public HTMLElement getBody()
Description copied from interface: HTMLDocument
The element that contains the content for the document. In documents with BODY contents, returns the BODY element. In frameset documents, this returns the outermost FRAMESET element.

Specified by:
getBody in interface HTMLDocument

getImages

public HTMLCollection getImages()
Description copied from interface: HTMLDocument
A collection of all the IMG elements in a document. The behavior is limited to IMG elements for backwards compatibility. As suggested by [HTML 4.01], to include images, authors may use the OBJECT element or the IMG element. Therefore, it is recommended not to use this attribute to find the images in the document but getElementsByTagName with HTML 4.01 or getElementsByTagNameNS with XHTML 1.0.

Specified by:
getImages in interface HTMLDocument

getApplets

public HTMLCollection getApplets()
Description copied from interface: HTMLDocument
A collection of all the OBJECT elements that include applets and APPLET (deprecated) elements in a document.

Specified by:
getApplets in interface HTMLDocument

getLinks

public HTMLCollection getLinks()
Description copied from interface: HTMLDocument
A collection of all AREA elements and anchor ( A) elements in a document with a value for the href attribute.

Specified by:
getLinks in interface HTMLDocument

getForms

public HTMLCollection getForms()
Description copied from interface: HTMLDocument
A collection of all the forms of a document.

Specified by:
getForms in interface HTMLDocument

getFrames

public HTMLCollection getFrames()

getAnchors

public HTMLCollection getAnchors()
Description copied from interface: HTMLDocument
A collection of all the anchor (A) elements in a document with a value for the name attribute. For reasons of backward compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute. Note that in [XHTML 1.0], the name attribute (see section 4.10) has no semantics and is only present for legacy user agents: the id attribute is used instead. Users should prefer the iterator mechanisms provided by [DOM Level 2 Traversal] instead.

Specified by:
getAnchors in interface HTMLDocument

getCookie

public java.lang.String getCookie()
Description copied from interface: HTMLDocument
This mutable string attribute denotes persistent state information that (1) is associated with the current frame or document and (2) is composed of information described by the cookies non-terminal of [IETF RFC 2965], Section 4.2.2.
If no persistent state information is available for the current frame or document document, then this property's value is an empty string.
When this attribute is read, all cookies are returned as a single string, with each cookie's name-value pair concatenated into a list of name-value pairs, each list item being separated by a ';' (semicolon).
When this attribute is set, the value it is set to should be a string that adheres to the cookie non-terminal of [IETF RFC 2965]; that is, it should be a single name-value pair followed by zero or more cookie attribute values. If no domain attribute is specified, then the domain attribute for the new value defaults to the host portion of an absolute URI [IETF RFC 2396] of the current frame or document. If no path attribute is specified, then the path attribute for the new value defaults to the absolute path portion of the URI [IETF RFC 2396] of the current frame or document. If no max-age attribute is specified, then the max-age attribute for the new value defaults to a user agent defined value. If a cookie with the specified name is already associated with the current frame or document, then the new value as well as the new attributes replace the old value and attributes. If a max-age attribute of 0 is specified for the new value, then any existing cookies of the specified name are removed from the cookie storage. See [IETF RFC 2965] for the semantics of persistent state item attribute value pairs. The precise nature of a user agent session is not defined by this specification.

Specified by:
getCookie in interface HTMLDocument

setCookie

public void setCookie(java.lang.String cookie)
               throws org.w3c.dom.DOMException
Description copied from interface: HTMLDocument
This mutable string attribute denotes persistent state information that (1) is associated with the current frame or document and (2) is composed of information described by the cookies non-terminal of [IETF RFC 2965], Section 4.2.2.
If no persistent state information is available for the current frame or document document, then this property's value is an empty string.
When this attribute is read, all cookies are returned as a single string, with each cookie's name-value pair concatenated into a list of name-value pairs, each list item being separated by a ';' (semicolon).
When this attribute is set, the value it is set to should be a string that adheres to the cookie non-terminal of [IETF RFC 2965]; that is, it should be a single name-value pair followed by zero or more cookie attribute values. If no domain attribute is specified, then the domain attribute for the new value defaults to the host portion of an absolute URI [IETF RFC 2396] of the current frame or document. If no path attribute is specified, then the path attribute for the new value defaults to the absolute path portion of the URI [IETF RFC 2396] of the current frame or document. If no max-age attribute is specified, then the max-age attribute for the new value defaults to a user agent defined value. If a cookie with the specified name is already associated with the current frame or document, then the new value as well as the new attributes replace the old value and attributes. If a max-age attribute of 0 is specified for the new value, then any existing cookies of the specified name are removed from the cookie storage. See [IETF RFC 2965] for the semantics of persistent state item attribute value pairs. The precise nature of a user agent session is not defined by this specification.

Specified by:
setCookie in interface HTMLDocument
Throws:
org.w3c.dom.DOMException - SYNTAX_ERR: If the new value does not adhere to the cookie syntax specified by [IETF RFC 2965].

open

public void open()
Description copied from interface: HTMLDocument
Open a document stream for writing. If a document exists in the target, this method clears it. This method and the ones following allow a user to add to or replace the structure model of a document using strings of unparsed HTML. At the time of writing alternate methods for providing similar functionality for both HTML and XML documents were being considered (see [DOM Level 3 Load and Save]).

Specified by:
open in interface HTMLDocument

load

public void load()
          throws java.io.IOException,
                 org.xml.sax.SAXException,
                 java.io.UnsupportedEncodingException
Loads the document from the reader provided when it was constructed. It then closes the reader.

Throws:
java.io.IOException
org.xml.sax.SAXException
java.io.UnsupportedEncodingException

load

public void load(boolean closeReader)
          throws java.io.IOException,
                 org.xml.sax.SAXException,
                 java.io.UnsupportedEncodingException
Throws:
java.io.IOException
org.xml.sax.SAXException
java.io.UnsupportedEncodingException

close

public void close()
Description copied from interface: HTMLDocument
Closes a document stream opened by open() and forces rendering.

Specified by:
close in interface HTMLDocument

write

public void write(java.lang.String text)
Description copied from interface: HTMLDocument
Write a string of text to a document stream opened by open(). Note that the function will produce a document which is not necessarily driven by a DTD and therefore might be produce an invalid result in the context of the document.

Specified by:
write in interface HTMLDocument
Parameters:
text - The string to be parsed into some structure in the document structure model.

writeln

public void writeln(java.lang.String text)
Description copied from interface: HTMLDocument
Write a string of text followed by a newline character to a document stream opened by open(). Note that the function will produce a document which is not necessarily driven by a DTD and therefore might be produce an invalid result in the context of the document

Specified by:
writeln in interface HTMLDocument
Parameters:
text - The string to be parsed into some structure in the document structure model.

getElementsByName

public org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
Gets the collection of elements whose name attribute is elementName.

Specified by:
getElementsByName in interface HTMLDocument
Parameters:
elementName - The name attribute value for an element.
Returns:
The matching elements.

getDoctype

public org.w3c.dom.DocumentType getDoctype()
Specified by:
getDoctype in interface org.w3c.dom.Document

setDoctype

public void setDoctype(org.w3c.dom.DocumentType doctype)

getDocumentElement

public org.w3c.dom.Element getDocumentElement()
Specified by:
getDocumentElement in interface org.w3c.dom.Document

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
Specified by:
createElement in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

createDocumentFragment

public org.w3c.dom.DocumentFragment createDocumentFragment()
Specified by:
createDocumentFragment in interface org.w3c.dom.Document

createTextNode

public org.w3c.dom.Text createTextNode(java.lang.String data)
Specified by:
createTextNode in interface org.w3c.dom.Document

createComment

public org.w3c.dom.Comment createComment(java.lang.String data)
Specified by:
createComment in interface org.w3c.dom.Document

createCDATASection

public org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
                                            throws org.w3c.dom.DOMException
Specified by:
createCDATASection in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

createProcessingInstruction

public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                                     java.lang.String data)
                                                              throws org.w3c.dom.DOMException
Specified by:
createProcessingInstruction in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

createAttribute

public org.w3c.dom.Attr createAttribute(java.lang.String name)
                                 throws org.w3c.dom.DOMException
Specified by:
createAttribute in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

createEntityReference

public org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
                                                  throws org.w3c.dom.DOMException
Specified by:
createEntityReference in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
Gets all elements that match the given tag name.

Specified by:
getElementsByTagName in interface org.w3c.dom.Document
Parameters:
tagname - The element tag name or an asterisk character (*) to match all elements.

importNode

public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
                                   boolean deep)
                            throws org.w3c.dom.DOMException
Specified by:
importNode in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
                                    throws org.w3c.dom.DOMException
Specified by:
createElementNS in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

createAttributeNS

public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
                                          java.lang.String qualifiedName)
                                   throws org.w3c.dom.DOMException
Specified by:
createAttributeNS in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                   java.lang.String localName)
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Document

getElementById

public org.w3c.dom.Element getElementById(java.lang.String elementId)
Specified by:
getElementById in interface org.w3c.dom.Document

namedItem

public org.w3c.dom.Element namedItem(java.lang.String name)

getInputEncoding

public java.lang.String getInputEncoding()
Specified by:
getInputEncoding in interface org.w3c.dom.Document

getXmlEncoding

public java.lang.String getXmlEncoding()
Specified by:
getXmlEncoding in interface org.w3c.dom.Document

getXmlStandalone

public boolean getXmlStandalone()
Specified by:
getXmlStandalone in interface org.w3c.dom.Document

setXmlStandalone

public void setXmlStandalone(boolean xmlStandalone)
                      throws org.w3c.dom.DOMException
Specified by:
setXmlStandalone in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getXmlVersion

public java.lang.String getXmlVersion()
Specified by:
getXmlVersion in interface org.w3c.dom.Document

setXmlVersion

public void setXmlVersion(java.lang.String xmlVersion)
                   throws org.w3c.dom.DOMException
Specified by:
setXmlVersion in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getStrictErrorChecking

public boolean getStrictErrorChecking()
Specified by:
getStrictErrorChecking in interface org.w3c.dom.Document

setStrictErrorChecking

public void setStrictErrorChecking(boolean strictErrorChecking)
Specified by:
setStrictErrorChecking in interface org.w3c.dom.Document

getDocumentURI

public java.lang.String getDocumentURI()
Specified by:
getDocumentURI in interface org.w3c.dom.Document

setDocumentURI

public void setDocumentURI(java.lang.String documentURI)
Specified by:
setDocumentURI in interface org.w3c.dom.Document

adoptNode

public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
                           throws org.w3c.dom.DOMException
Specified by:
adoptNode in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getDomConfig

public org.w3c.dom.DOMConfiguration getDomConfig()
Specified by:
getDomConfig in interface org.w3c.dom.Document

normalizeDocument

public void normalizeDocument()
Specified by:
normalizeDocument in interface org.w3c.dom.Document

renameNode

public org.w3c.dom.Node renameNode(org.w3c.dom.Node n,
                                   java.lang.String namespaceURI,
                                   java.lang.String qualifiedName)
                            throws org.w3c.dom.DOMException
Specified by:
renameNode in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getImplementation

public org.w3c.dom.DOMImplementation getImplementation()
Specified by:
getImplementation in interface org.w3c.dom.Document

getLocalName

public java.lang.String getLocalName()
Specified by:
getLocalName in interface org.w3c.dom.Node
Specified by:
getLocalName in class NodeImpl

getNodeName

public java.lang.String getNodeName()
Specified by:
getNodeName in interface org.w3c.dom.Node
Specified by:
getNodeName in class NodeImpl

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface org.w3c.dom.Node
Specified by:
getNodeType in class NodeImpl

getNodeValue

public java.lang.String getNodeValue()
                              throws org.w3c.dom.DOMException
Specified by:
getNodeValue in interface org.w3c.dom.Node
Specified by:
getNodeValue in class NodeImpl
Throws:
org.w3c.dom.DOMException

setNodeValue

public void setNodeValue(java.lang.String nodeValue)
                  throws org.w3c.dom.DOMException
Specified by:
setNodeValue in interface org.w3c.dom.Node
Specified by:
setNodeValue in class NodeImpl
Throws:
org.w3c.dom.DOMException

getHtmlRendererContext

public final HtmlRendererContext getHtmlRendererContext()
Overrides:
getHtmlRendererContext in class NodeImpl

getUserAgentContext

public UserAgentContext getUserAgentContext()
Overrides:
getUserAgentContext in class NodeImpl

getFullURL

public final java.net.URL getFullURL(java.lang.String uri)
Specified by:
getFullURL in interface ModelNode
Overrides:
getFullURL in class NodeImpl

getLocation

public final Location getLocation()

setLocation

public void setLocation(java.lang.String location)

getURL

public java.lang.String getURL()
Description copied from interface: HTMLDocument
The absolute URI [IETF RFC 2396] of the document.

Specified by:
getURL in interface HTMLDocument

setBody

public void setBody(HTMLElement body)
Description copied from interface: HTMLDocument
The element that contains the content for the document. In documents with BODY contents, returns the BODY element. In frameset documents, this returns the outermost FRAMESET element.

Specified by:
setBody in interface HTMLDocument

getStyleSheets

public java.util.Collection getStyleSheets()

addDocumentNotificationListener

public void addDocumentNotificationListener(DocumentNotificationListener listener)
Adds a document notification listener, which is informed about changes to the document.

Parameters:
listener - An instance of DocumentNotificationListener.

removeDocumentNotificationListener

public void removeDocumentNotificationListener(DocumentNotificationListener listener)

sizeInvalidated

public void sizeInvalidated(NodeImpl node)

lookInvalidated

public void lookInvalidated(NodeImpl node)
Called if something such as a color or decoration has changed. This would be something which does not affect the rendered size, and can be revalidated with a simple repaint.

Parameters:
node -

positionInParentInvalidated

public void positionInParentInvalidated(NodeImpl node)
Changed if the position of the node in a parent has changed.

Parameters:
node -

invalidated

public void invalidated(NodeImpl node)
This is called when the node has changed, but it is unclear if it's a size change or a look change. An attribute change should trigger this.

Parameters:
node -

structureInvalidated

public void structureInvalidated(NodeImpl node)
This is called when children of the node might have changed.

Parameters:
node -

nodeLoaded

public void nodeLoaded(NodeImpl node)

externalScriptLoading

public void externalScriptLoading(NodeImpl node)

allInvalidated

public void allInvalidated()

createRenderState

protected RenderState createRenderState(RenderState prevRenderState)
Overrides:
createRenderState in class NodeImpl

loadImage

protected void loadImage(java.lang.String relativeUri,
                         ImageListener imageListener)
Loads images asynchronously such that they are shared if loaded simultaneously from the same URI. Informs the listener immediately if an image is already known.

Parameters:
relativeUri -
imageListener -

getOnloadHandler

public org.mozilla.javascript.Function getOnloadHandler()

setOnloadHandler

public void setOnloadHandler(org.mozilla.javascript.Function onloadHandler)

setUserData

public java.lang.Object setUserData(java.lang.String key,
                                    java.lang.Object data,
                                    org.w3c.dom.UserDataHandler handler)
Specified by:
setUserData in interface org.w3c.dom.Node
Overrides:
setUserData in class NodeImpl

createSimilarNode

protected org.w3c.dom.Node createSimilarNode()
Description copied from class: NodeImpl
Should create a node with some cloned properties, like the node name, but not attributes or children.

Specified by:
createSimilarNode in class NodeImpl