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 W3CHTMLDocumentinterface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHTMLDocumentImpl.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 voidaddDocumentNotificationListener(DocumentNotificationListener listener)Adds a document notification listener, which is informed about changes to the document.org.w3c.dom.NodeadoptNode(org.w3c.dom.Node source)voidallInvalidated()Informs listeners that the whole document has been invalidated.voidallInvalidated(boolean forgetRenderStates)voidclose()Closes a document stream opened byopen()and forces rendering.org.w3c.dom.AttrcreateAttribute(java.lang.String name)org.w3c.dom.AttrcreateAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)org.w3c.dom.CDATASectioncreateCDATASection(java.lang.String data)org.w3c.dom.CommentcreateComment(java.lang.String data)org.w3c.dom.DocumentFragmentcreateDocumentFragment()org.w3c.dom.ElementcreateElement(java.lang.String tagName)org.w3c.dom.ElementcreateElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)org.w3c.dom.EntityReferencecreateEntityReference(java.lang.String name)org.w3c.dom.ProcessingInstructioncreateProcessingInstruction(java.lang.String target, java.lang.String data)protected RenderStatecreateRenderState(RenderState prevRenderState)protected org.w3c.dom.NodecreateSimilarNode()Should create a node with some cloned properties, like the node name, but not attributes or children.org.w3c.dom.TextcreateTextNode(java.lang.String data)voidexternalScriptLoading(NodeImpl node)HTMLCollectiongetAnchors()A collection of all the anchor (A) elements in a document with a value for thenameattribute.HTMLCollectiongetApplets()A collection of all theOBJECTelements that include applets andAPPLET(deprecated) elements in a document.java.lang.StringgetBaseURI()HTMLElementgetBody()The element that contains the content for the document.java.lang.StringgetCookie()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 thecookiesnon-terminal of [IETF RFC 2965], Section 4.2.2.java.lang.StringgetDefaultTarget()AbstractViewgetDefaultView()The defaultAbstractViewfor thisDocument, ornullif none available.org.w3c.dom.DocumentTypegetDoctype()org.w3c.dom.ElementgetDocumentElement()java.lang.StringgetDocumentURI()java.net.URLgetDocumentURL()java.lang.StringgetDomain()The domain name of the server that served the document, ornullif the server cannot be identified by a domain name.org.w3c.dom.DOMConfigurationgetDomConfig()org.w3c.dom.ElementgetElementById(java.lang.String elementId)org.w3c.dom.NodeListgetElementsByName(java.lang.String elementName)Gets the collection of elements whosenameattribute iselementName.org.w3c.dom.NodeListgetElementsByTagName(java.lang.String tagname)Gets all elements that match the given tag name.org.w3c.dom.NodeListgetElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)HTMLCollectiongetForms()A collection of all the forms of a document.HTMLCollectiongetFrames()java.net.URLgetFullURL(java.lang.String uri)HtmlRendererContextgetHtmlRendererContext()HTMLCollectiongetImages()A collection of all theIMGelements in a document.org.w3c.dom.DOMImplementationgetImplementation()java.lang.StringgetInputEncoding()HTMLCollectiongetLinks()A collection of allAREAelements and anchor (A) elements in a document with a value for thehrefattribute.java.util.SetgetLocales()Gets an immutable set of locales previously set for this document.java.lang.StringgetLocalName()LocationgetLocation()java.lang.StringgetNodeName()shortgetNodeType()java.lang.StringgetNodeValue()org.mozilla.javascript.FunctiongetOnloadHandler()java.lang.StringgetReferrer()Returns the URI [IETF RFC 2396] of the page that linked to this page.booleangetStrictErrorChecking()java.util.CollectiongetStyleSheets()java.lang.StringgetTextContent()Gets the text content of this node and its descendents.java.lang.StringgetTitle()The title of a document as specified by theTITLEelement in the head of the document.java.lang.StringgetURL()The absolute URI [IETF RFC 2396] of the document.UserAgentContextgetUserAgentContext()java.lang.StringgetXmlEncoding()booleangetXmlStandalone()java.lang.StringgetXmlVersion()org.w3c.dom.NodeimportNode(org.w3c.dom.Node importedNode, boolean deep)voidinvalidated(NodeImpl node)This is called when the node has changed, but it is unclear if it's a size change or a look change.voidload()Loads the document from the reader provided when the current instance ofHTMLDocumentImplwas constructed.voidload(boolean closeReader)protected voidloadImage(java.lang.String relativeUri, ImageListener imageListener)Loads images asynchronously such that they are shared if loaded simultaneously from the same URI.voidlookInvalidated(NodeImpl node)Called if something such as a color or decoration has changed.org.w3c.dom.ElementnamedItem(java.lang.String name)voidnodeLoaded(NodeImpl node)voidnormalizeDocument()voidopen()Open a document stream for writing.voidpositionInParentInvalidated(NodeImpl node)Changed if the position of the node in a parent has changed.voidremoveDocumentNotificationListener(DocumentNotificationListener listener)org.w3c.dom.NoderenameNode(org.w3c.dom.Node n, java.lang.String namespaceURI, java.lang.String qualifiedName)voidsetBaseURI(java.lang.String value)voidsetBody(HTMLElement body)The element that contains the content for the document.voidsetCookie(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 thecookiesnon-terminal of [IETF RFC 2965], Section 4.2.2.voidsetDefaultTarget(java.lang.String value)voidsetDoctype(org.w3c.dom.DocumentType doctype)voidsetDocumentURI(java.lang.String documentURI)voidsetDomain(java.lang.String domain)voidsetLocales(java.util.Set locales)Sets the locales of the document.voidsetLocation(java.lang.String location)voidsetNodeValue(java.lang.String nodeValue)voidsetOnloadHandler(org.mozilla.javascript.Function onloadHandler)voidsetReferrer(java.lang.String value)voidsetStrictErrorChecking(boolean strictErrorChecking)voidsetTextContent(java.lang.String textContent)voidsetTitle(java.lang.String title)The title of a document as specified by theTITLEelement in the head of the document.java.lang.ObjectsetUserData(java.lang.String key, java.lang.Object data, org.w3c.dom.UserDataHandler handler)voidsetXmlStandalone(boolean xmlStandalone)voidsetXmlVersion(java.lang.String xmlVersion)voidsizeInvalidated(NodeImpl node)voidstructureInvalidated(NodeImpl node)This is called when children of the node might have changed.voidwrite(java.lang.String text)Write a string of text to a document stream opened byopen().voidwriteln(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.Localeinstances.
-
getDocumentURL
public java.net.URL getDocumentURL()
- Overrides:
getDocumentURLin classNodeImpl
-
getBaseURI
public java.lang.String getBaseURI()
- Specified by:
getBaseURIin interfaceorg.w3c.dom.Node- Overrides:
getBaseURIin 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:DocumentViewThe defaultAbstractViewfor thisDocument, ornullif none available.- Specified by:
getDefaultViewin interfaceDocumentView
-
getTextContent
public java.lang.String getTextContent() throws org.w3c.dom.DOMExceptionDescription copied from class:NodeImplGets the text content of this node and its descendents.- Specified by:
getTextContentin interfaceorg.w3c.dom.Node- Overrides:
getTextContentin classNodeImpl- Throws:
org.w3c.dom.DOMException
-
setTextContent
public void setTextContent(java.lang.String textContent) throws org.w3c.dom.DOMException- Specified by:
setTextContentin interfaceorg.w3c.dom.Node- Overrides:
setTextContentin classNodeImpl- Throws:
org.w3c.dom.DOMException
-
getTitle
public java.lang.String getTitle()
Description copied from interface:HTMLDocumentThe title of a document as specified by theTITLEelement in the head of the document.- Specified by:
getTitlein interfaceHTMLDocument
-
setTitle
public void setTitle(java.lang.String title)
Description copied from interface:HTMLDocumentThe title of a document as specified by theTITLEelement in the head of the document.- Specified by:
setTitlein interfaceHTMLDocument
-
getReferrer
public java.lang.String getReferrer()
Description copied from interface:HTMLDocumentReturns 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:
getReferrerin interfaceHTMLDocument
-
setReferrer
public void setReferrer(java.lang.String value)
-
getDomain
public java.lang.String getDomain()
Description copied from interface:HTMLDocumentThe domain name of the server that served the document, ornullif the server cannot be identified by a domain name.- Specified by:
getDomainin interfaceHTMLDocument
-
setDomain
public void setDomain(java.lang.String domain)
-
getBody
public HTMLElement getBody()
Description copied from interface:HTMLDocumentThe element that contains the content for the document. In documents withBODYcontents, returns theBODYelement. In frameset documents, this returns the outermostFRAMESETelement.- Specified by:
getBodyin interfaceHTMLDocument
-
getImages
public HTMLCollection getImages()
Description copied from interface:HTMLDocumentA collection of all theIMGelements in a document. The behavior is limited toIMGelements for backwards compatibility. As suggested by [HTML 4.01], to include images, authors may use theOBJECTelement or theIMGelement. Therefore, it is recommended not to use this attribute to find the images in the document butgetElementsByTagNamewith HTML 4.01 orgetElementsByTagNameNSwith XHTML 1.0.- Specified by:
getImagesin interfaceHTMLDocument
-
getApplets
public HTMLCollection getApplets()
Description copied from interface:HTMLDocumentA collection of all theOBJECTelements that include applets andAPPLET(deprecated) elements in a document.- Specified by:
getAppletsin interfaceHTMLDocument
-
getLinks
public HTMLCollection getLinks()
Description copied from interface:HTMLDocumentA collection of allAREAelements and anchor (A) elements in a document with a value for thehrefattribute.- Specified by:
getLinksin interfaceHTMLDocument
-
getForms
public HTMLCollection getForms()
Description copied from interface:HTMLDocumentA collection of all the forms of a document.- Specified by:
getFormsin interfaceHTMLDocument
-
getFrames
public HTMLCollection getFrames()
-
getAnchors
public HTMLCollection getAnchors()
Description copied from interface:HTMLDocumentA collection of all the anchor (A) elements in a document with a value for thenameattribute. For reasons of backward compatibility, the returned set of anchors only contains those anchors created with thenameattribute, not those created with theidattribute. Note that in [XHTML 1.0], thenameattribute (see section 4.10) has no semantics and is only present for legacy user agents: theidattribute is used instead. Users should prefer the iterator mechanisms provided by [DOM Level 2 Traversal] instead.- Specified by:
getAnchorsin interfaceHTMLDocument
-
getCookie
public java.lang.String getCookie()
Description copied from interface:HTMLDocumentThis 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 thecookiesnon-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 thecookienon-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:
getCookiein interfaceHTMLDocument
-
setCookie
public void setCookie(java.lang.String cookie) throws org.w3c.dom.DOMExceptionDescription copied from interface:HTMLDocumentThis 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 thecookiesnon-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 thecookienon-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:
setCookiein 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:HTMLDocumentOpen 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:
openin interfaceHTMLDocument
-
load
public void load() throws java.io.IOException, org.xml.sax.SAXException, java.io.UnsupportedEncodingExceptionLoads the document from the reader provided when the current instance ofHTMLDocumentImplwas constructed. It then closes the reader.- Throws:
java.io.IOExceptionorg.xml.sax.SAXExceptionjava.io.UnsupportedEncodingException
-
load
public void load(boolean closeReader) throws java.io.IOException, org.xml.sax.SAXException, java.io.UnsupportedEncodingException- Throws:
java.io.IOExceptionorg.xml.sax.SAXExceptionjava.io.UnsupportedEncodingException
-
close
public void close()
Description copied from interface:HTMLDocumentCloses a document stream opened byopen()and forces rendering.- Specified by:
closein interfaceHTMLDocument
-
write
public void write(java.lang.String text)
Description copied from interface:HTMLDocumentWrite 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:
writein 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:HTMLDocumentWrite 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:
writelnin 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 whosenameattribute iselementName.- Specified by:
getElementsByNamein interfaceHTMLDocument- Parameters:
elementName- Thenameattribute value for an element.- Returns:
- The matching elements.
-
getDoctype
public org.w3c.dom.DocumentType getDoctype()
- Specified by:
getDoctypein interfaceorg.w3c.dom.Document
-
setDoctype
public void setDoctype(org.w3c.dom.DocumentType doctype)
-
getDocumentElement
public org.w3c.dom.Element getDocumentElement()
- Specified by:
getDocumentElementin interfaceorg.w3c.dom.Document
-
createElement
public org.w3c.dom.Element createElement(java.lang.String tagName) throws org.w3c.dom.DOMException- Specified by:
createElementin interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
createDocumentFragment
public org.w3c.dom.DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragmentin interfaceorg.w3c.dom.Document
-
createTextNode
public org.w3c.dom.Text createTextNode(java.lang.String data)
- Specified by:
createTextNodein interfaceorg.w3c.dom.Document
-
createComment
public org.w3c.dom.Comment createComment(java.lang.String data)
- Specified by:
createCommentin interfaceorg.w3c.dom.Document
-
createCDATASection
public org.w3c.dom.CDATASection createCDATASection(java.lang.String data) throws org.w3c.dom.DOMException- Specified by:
createCDATASectionin 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:
createProcessingInstructionin 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:
createAttributein 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:
createEntityReferencein 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:
getElementsByTagNamein 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:
importNodein 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:
createElementNSin 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:
createAttributeNSin 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:
getElementsByTagNameNSin interfaceorg.w3c.dom.Document
-
getElementById
public org.w3c.dom.Element getElementById(java.lang.String elementId)
- Specified by:
getElementByIdin interfaceorg.w3c.dom.Document
-
namedItem
public org.w3c.dom.Element namedItem(java.lang.String name)
-
getInputEncoding
public java.lang.String getInputEncoding()
- Specified by:
getInputEncodingin interfaceorg.w3c.dom.Document
-
getXmlEncoding
public java.lang.String getXmlEncoding()
- Specified by:
getXmlEncodingin interfaceorg.w3c.dom.Document
-
getXmlStandalone
public boolean getXmlStandalone()
- Specified by:
getXmlStandalonein interfaceorg.w3c.dom.Document
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) throws org.w3c.dom.DOMException- Specified by:
setXmlStandalonein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getXmlVersion
public java.lang.String getXmlVersion()
- Specified by:
getXmlVersionin interfaceorg.w3c.dom.Document
-
setXmlVersion
public void setXmlVersion(java.lang.String xmlVersion) throws org.w3c.dom.DOMException- Specified by:
setXmlVersionin interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
- Specified by:
getStrictErrorCheckingin interfaceorg.w3c.dom.Document
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking)
- Specified by:
setStrictErrorCheckingin interfaceorg.w3c.dom.Document
-
getDocumentURI
public java.lang.String getDocumentURI()
- Specified by:
getDocumentURIin interfaceorg.w3c.dom.Document
-
setDocumentURI
public void setDocumentURI(java.lang.String documentURI)
- Specified by:
setDocumentURIin interfaceorg.w3c.dom.Document
-
adoptNode
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws org.w3c.dom.DOMException- Specified by:
adoptNodein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getDomConfig
public org.w3c.dom.DOMConfiguration getDomConfig()
- Specified by:
getDomConfigin interfaceorg.w3c.dom.Document
-
normalizeDocument
public void normalizeDocument()
- Specified by:
normalizeDocumentin 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:
renameNodein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getImplementation
public org.w3c.dom.DOMImplementation getImplementation()
- Specified by:
getImplementationin interfaceorg.w3c.dom.Document
-
getLocalName
public java.lang.String getLocalName()
- Specified by:
getLocalNamein interfaceorg.w3c.dom.Node- Specified by:
getLocalNamein classNodeImpl
-
getNodeName
public java.lang.String getNodeName()
- Specified by:
getNodeNamein interfaceorg.w3c.dom.Node- Specified by:
getNodeNamein classNodeImpl
-
getNodeType
public short getNodeType()
- Specified by:
getNodeTypein interfaceorg.w3c.dom.Node- Specified by:
getNodeTypein classNodeImpl
-
getNodeValue
public java.lang.String getNodeValue() throws org.w3c.dom.DOMException- Specified by:
getNodeValuein interfaceorg.w3c.dom.Node- Specified by:
getNodeValuein classNodeImpl- Throws:
org.w3c.dom.DOMException
-
setNodeValue
public void setNodeValue(java.lang.String nodeValue) throws org.w3c.dom.DOMException- Specified by:
setNodeValuein interfaceorg.w3c.dom.Node- Specified by:
setNodeValuein classNodeImpl- Throws:
org.w3c.dom.DOMException
-
getHtmlRendererContext
public final HtmlRendererContext getHtmlRendererContext()
- Overrides:
getHtmlRendererContextin classNodeImpl
-
getUserAgentContext
public UserAgentContext getUserAgentContext()
- Overrides:
getUserAgentContextin classNodeImpl
-
getFullURL
public final java.net.URL getFullURL(java.lang.String uri)
- Specified by:
getFullURLin interfaceModelNode- Overrides:
getFullURLin classNodeImpl
-
getLocation
public final Location getLocation()
-
setLocation
public void setLocation(java.lang.String location)
-
getURL
public java.lang.String getURL()
Description copied from interface:HTMLDocumentThe absolute URI [IETF RFC 2396] of the document.- Specified by:
getURLin interfaceHTMLDocument
-
setBody
public void setBody(HTMLElement body)
Description copied from interface:HTMLDocumentThe element that contains the content for the document. In documents withBODYcontents, returns theBODYelement. In frameset documents, this returns the outermostFRAMESETelement.- Specified by:
setBodyin 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:
createRenderStatein 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:
setUserDatain interfaceorg.w3c.dom.Node- Overrides:
setUserDatain classNodeImpl
-
createSimilarNode
protected org.w3c.dom.Node createSimilarNode()
Description copied from class:NodeImplShould create a node with some cloned properties, like the node name, but not attributes or children.- Specified by:
createSimilarNodein classNodeImpl
-
-