Package org.lobobrowser.html.domimpl
Class HTMLDocumentImpl
- java.lang.Object
-
- org.lobobrowser.js.AbstractScriptableDelegate
-
- org.lobobrowser.html.domimpl.NodeImpl
-
- 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 W3CHTMLDocument
interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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
Constructors Constructor Description HTMLDocumentImpl(HtmlRendererContext rcontext)
HTMLDocumentImpl(UserAgentContext ucontext)
HTMLDocumentImpl(UserAgentContext ucontext, HtmlRendererContext rcontext, WritableLineReader reader, java.lang.String documentURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
Informs listeners that the whole document has been invalidated.void
allInvalidated(boolean forgetRenderStates)
void
close()
Closes a document stream opened byopen()
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 thename
attribute.HTMLCollection
getApplets()
A collection of all theOBJECT
elements that include applets andAPPLET
(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 thecookies
non-terminal of [IETF RFC 2965], Section 4.2.2.java.lang.String
getDefaultTarget()
AbstractView
getDefaultView()
The defaultAbstractView
for thisDocument
, ornull
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, ornull
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 whosename
attribute iselementName
.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 theIMG
elements in a document.org.w3c.dom.DOMImplementation
getImplementation()
java.lang.String
getInputEncoding()
HTMLCollection
getLinks()
A collection of allAREA
elements and anchor (A
) elements in a document with a value for thehref
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 theTITLE
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 the current instance ofHTMLDocumentImpl
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 thecookies
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 theTITLE
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 byopen()
.void
writeln(java.lang.String text)
Write a string of text followed by a newline character to a document stream opened byopen()
.-
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, appendInnerTextImpl, cloneNode, compareDocumentPosition, equalAttributes, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getAttributes, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getFeature, getFirstChild, getInnerHTML, getInnerText, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getUINode, getUserData, hasAttributes, hasChildNodes, htmlEncodeChildText, informDocumentInvalid, 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 ofjava.util.Locale
instances.
-
getDocumentURL
public java.net.URL getDocumentURL()
- Overrides:
getDocumentURL
in classNodeImpl
-
getBaseURI
public java.lang.String getBaseURI()
- Specified by:
getBaseURI
in interfaceorg.w3c.dom.Node
- Overrides:
getBaseURI
in classNodeImpl
-
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 defaultAbstractView
for thisDocument
, ornull
if none available.- Specified by:
getDefaultView
in interfaceDocumentView
-
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 interfaceorg.w3c.dom.Node
- Overrides:
getTextContent
in classNodeImpl
- Throws:
org.w3c.dom.DOMException
-
setTextContent
public void setTextContent(java.lang.String textContent) throws org.w3c.dom.DOMException
- Specified by:
setTextContent
in interfaceorg.w3c.dom.Node
- Overrides:
setTextContent
in classNodeImpl
- Throws:
org.w3c.dom.DOMException
-
getTitle
public java.lang.String getTitle()
Description copied from interface:HTMLDocument
The title of a document as specified by theTITLE
element in the head of the document.- Specified by:
getTitle
in interfaceHTMLDocument
-
setTitle
public void setTitle(java.lang.String title)
Description copied from interface:HTMLDocument
The title of a document as specified by theTITLE
element in the head of the document.- Specified by:
setTitle
in interfaceHTMLDocument
-
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 interfaceHTMLDocument
-
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, ornull
if the server cannot be identified by a domain name.- Specified by:
getDomain
in interfaceHTMLDocument
-
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 withBODY
contents, returns theBODY
element. In frameset documents, this returns the outermostFRAMESET
element.- Specified by:
getBody
in interfaceHTMLDocument
-
getImages
public HTMLCollection getImages()
Description copied from interface:HTMLDocument
A collection of all theIMG
elements in a document. The behavior is limited toIMG
elements for backwards compatibility. As suggested by [HTML 4.01], to include images, authors may use theOBJECT
element or theIMG
element. Therefore, it is recommended not to use this attribute to find the images in the document butgetElementsByTagName
with HTML 4.01 orgetElementsByTagNameNS
with XHTML 1.0.- Specified by:
getImages
in interfaceHTMLDocument
-
getApplets
public HTMLCollection getApplets()
Description copied from interface:HTMLDocument
A collection of all theOBJECT
elements that include applets andAPPLET
(deprecated) elements in a document.- Specified by:
getApplets
in interfaceHTMLDocument
-
getLinks
public HTMLCollection getLinks()
Description copied from interface:HTMLDocument
A collection of allAREA
elements and anchor (A
) elements in a document with a value for thehref
attribute.- Specified by:
getLinks
in interfaceHTMLDocument
-
getForms
public HTMLCollection getForms()
Description copied from interface:HTMLDocument
A collection of all the forms of a document.- Specified by:
getForms
in interfaceHTMLDocument
-
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 thename
attribute. For reasons of backward compatibility, the returned set of anchors only contains those anchors created with thename
attribute, not those created with theid
attribute. Note that in [XHTML 1.0], thename
attribute (see section 4.10) has no semantics and is only present for legacy user agents: theid
attribute is used instead. Users should prefer the iterator mechanisms provided by [DOM Level 2 Traversal] instead.- Specified by:
getAnchors
in interfaceHTMLDocument
-
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 thecookies
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 thecookie
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 interfaceHTMLDocument
-
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 thecookies
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 thecookie
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 interfaceHTMLDocument
- 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 interfaceHTMLDocument
-
load
public void load() throws java.io.IOException, org.xml.sax.SAXException, java.io.UnsupportedEncodingException
Loads the document from the reader provided when the current instance ofHTMLDocumentImpl
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 byopen()
and forces rendering.- Specified by:
close
in interfaceHTMLDocument
-
write
public void write(java.lang.String text)
Description copied from interface:HTMLDocument
Write a string of text to a document stream opened byopen()
. 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 interfaceHTMLDocument
- 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 byopen()
. 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 interfaceHTMLDocument
- 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 whosename
attribute iselementName
.- Specified by:
getElementsByName
in interfaceHTMLDocument
- Parameters:
elementName
- Thename
attribute value for an element.- Returns:
- The matching elements.
-
getDoctype
public org.w3c.dom.DocumentType getDoctype()
- Specified by:
getDoctype
in interfaceorg.w3c.dom.Document
-
setDoctype
public void setDoctype(org.w3c.dom.DocumentType doctype)
-
getDocumentElement
public org.w3c.dom.Element getDocumentElement()
- Specified by:
getDocumentElement
in interfaceorg.w3c.dom.Document
-
createElement
public org.w3c.dom.Element createElement(java.lang.String tagName) throws org.w3c.dom.DOMException
- Specified by:
createElement
in interfaceorg.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
-
createDocumentFragment
public org.w3c.dom.DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragment
in interfaceorg.w3c.dom.Document
-
createTextNode
public org.w3c.dom.Text createTextNode(java.lang.String data)
- Specified by:
createTextNode
in interfaceorg.w3c.dom.Document
-
createComment
public org.w3c.dom.Comment createComment(java.lang.String data)
- Specified by:
createComment
in interfaceorg.w3c.dom.Document
-
createCDATASection
public org.w3c.dom.CDATASection createCDATASection(java.lang.String data) throws org.w3c.dom.DOMException
- Specified by:
createCDATASection
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.w3c.dom.Document
-
getElementById
public org.w3c.dom.Element getElementById(java.lang.String elementId)
- Specified by:
getElementById
in interfaceorg.w3c.dom.Document
-
namedItem
public org.w3c.dom.Element namedItem(java.lang.String name)
-
getInputEncoding
public java.lang.String getInputEncoding()
- Specified by:
getInputEncoding
in interfaceorg.w3c.dom.Document
-
getXmlEncoding
public java.lang.String getXmlEncoding()
- Specified by:
getXmlEncoding
in interfaceorg.w3c.dom.Document
-
getXmlStandalone
public boolean getXmlStandalone()
- Specified by:
getXmlStandalone
in interfaceorg.w3c.dom.Document
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) throws org.w3c.dom.DOMException
- Specified by:
setXmlStandalone
in interfaceorg.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
-
getXmlVersion
public java.lang.String getXmlVersion()
- Specified by:
getXmlVersion
in interfaceorg.w3c.dom.Document
-
setXmlVersion
public void setXmlVersion(java.lang.String xmlVersion) throws org.w3c.dom.DOMException
- Specified by:
setXmlVersion
in interfaceorg.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
- Specified by:
getStrictErrorChecking
in interfaceorg.w3c.dom.Document
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking)
- Specified by:
setStrictErrorChecking
in interfaceorg.w3c.dom.Document
-
getDocumentURI
public java.lang.String getDocumentURI()
- Specified by:
getDocumentURI
in interfaceorg.w3c.dom.Document
-
setDocumentURI
public void setDocumentURI(java.lang.String documentURI)
- Specified by:
setDocumentURI
in interfaceorg.w3c.dom.Document
-
adoptNode
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws org.w3c.dom.DOMException
- Specified by:
adoptNode
in interfaceorg.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
-
getDomConfig
public org.w3c.dom.DOMConfiguration getDomConfig()
- Specified by:
getDomConfig
in interfaceorg.w3c.dom.Document
-
normalizeDocument
public void normalizeDocument()
- Specified by:
normalizeDocument
in interfaceorg.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 interfaceorg.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
-
getImplementation
public org.w3c.dom.DOMImplementation getImplementation()
- Specified by:
getImplementation
in interfaceorg.w3c.dom.Document
-
getLocalName
public java.lang.String getLocalName()
- Specified by:
getLocalName
in interfaceorg.w3c.dom.Node
- Specified by:
getLocalName
in classNodeImpl
-
getNodeName
public java.lang.String getNodeName()
- Specified by:
getNodeName
in interfaceorg.w3c.dom.Node
- Specified by:
getNodeName
in classNodeImpl
-
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interfaceorg.w3c.dom.Node
- Specified by:
getNodeType
in classNodeImpl
-
getNodeValue
public java.lang.String getNodeValue() throws org.w3c.dom.DOMException
- Specified by:
getNodeValue
in interfaceorg.w3c.dom.Node
- Specified by:
getNodeValue
in classNodeImpl
- Throws:
org.w3c.dom.DOMException
-
setNodeValue
public void setNodeValue(java.lang.String nodeValue) throws org.w3c.dom.DOMException
- Specified by:
setNodeValue
in interfaceorg.w3c.dom.Node
- Specified by:
setNodeValue
in classNodeImpl
- Throws:
org.w3c.dom.DOMException
-
getHtmlRendererContext
public final HtmlRendererContext getHtmlRendererContext()
- Overrides:
getHtmlRendererContext
in classNodeImpl
-
getUserAgentContext
public UserAgentContext getUserAgentContext()
- Overrides:
getUserAgentContext
in classNodeImpl
-
getFullURL
public final java.net.URL getFullURL(java.lang.String uri)
- Specified by:
getFullURL
in interfaceModelNode
- Overrides:
getFullURL
in classNodeImpl
-
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 interfaceHTMLDocument
-
setBody
public void setBody(HTMLElement body)
Description copied from interface:HTMLDocument
The element that contains the content for the document. In documents withBODY
contents, returns theBODY
element. In frameset documents, this returns the outermostFRAMESET
element.- Specified by:
setBody
in interfaceHTMLDocument
-
allInvalidated
public void allInvalidated(boolean forgetRenderStates)
-
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 ofDocumentNotificationListener
.
-
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()
Informs listeners that the whole document has been invalidated.
-
createRenderState
protected RenderState createRenderState(RenderState prevRenderState)
- Overrides:
createRenderState
in classNodeImpl
-
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 interfaceorg.w3c.dom.Node
- Overrides:
setUserData
in classNodeImpl
-
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 classNodeImpl
-
-