|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lobobrowser.js.AbstractScriptableDelegate
org.lobobrowser.html.domimpl.NodeImpl
org.lobobrowser.html.domimpl.HTMLDocumentImpl
public class HTMLDocumentImpl
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,
org.lobobrowser.html.io.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()
Informs listeners that the whole document has been invalidated. |
void |
allInvalidated(boolean forgetRenderStates)
|
void |
close()
|
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 org.lobobrowser.html.style.RenderState |
createRenderState(org.lobobrowser.html.style.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)
|
org.w3c.dom.html2.HTMLCollection |
getAnchors()
|
org.w3c.dom.html2.HTMLCollection |
getApplets()
|
java.lang.String |
getBaseURI()
|
org.w3c.dom.html2.HTMLElement |
getBody()
|
java.lang.String |
getCookie()
|
java.lang.String |
getDefaultTarget()
|
org.w3c.dom.views.AbstractView |
getDefaultView()
|
org.w3c.dom.DocumentType |
getDoctype()
|
org.w3c.dom.Element |
getDocumentElement()
|
java.lang.String |
getDocumentURI()
|
java.net.URL |
getDocumentURL()
|
java.lang.String |
getDomain()
|
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)
|
org.w3c.dom.html2.HTMLCollection |
getForms()
|
org.w3c.dom.html2.HTMLCollection |
getFrames()
|
java.net.URL |
getFullURL(java.lang.String uri)
|
HtmlRendererContext |
getHtmlRendererContext()
|
org.w3c.dom.html2.HTMLCollection |
getImages()
|
org.w3c.dom.DOMImplementation |
getImplementation()
|
java.lang.String |
getInputEncoding()
|
org.w3c.dom.html2.HTMLCollection |
getLinks()
|
java.util.Set |
getLocales()
Gets an immutable set of locales previously set for this document. |
java.lang.String |
getLocalName()
|
org.lobobrowser.html.js.Location |
getLocation()
|
java.lang.String |
getNodeName()
|
short |
getNodeType()
|
java.lang.String |
getNodeValue()
|
org.mozilla.javascript.Function |
getOnloadHandler()
|
java.lang.String |
getReferrer()
|
boolean |
getStrictErrorChecking()
|
java.util.Collection |
getStyleSheets()
|
java.lang.String |
getTextContent()
Gets the text content of this node and its descendents. |
java.lang.String |
getTitle()
|
java.lang.String |
getURL()
|
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 of HTMLDocumentImpl 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()
|
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(org.w3c.dom.html2.HTMLElement body)
|
void |
setCookie(java.lang.String cookie)
|
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)
|
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)
|
void |
writeln(java.lang.String text)
|
| 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 |
|---|
public HTMLDocumentImpl(HtmlRendererContext rcontext)
public HTMLDocumentImpl(UserAgentContext ucontext)
public HTMLDocumentImpl(UserAgentContext ucontext,
HtmlRendererContext rcontext,
org.lobobrowser.html.io.WritableLineReader reader,
java.lang.String documentURI)
| Method Detail |
|---|
public java.util.Set getLocales()
public void setLocales(java.util.Set locales)
locales - An immutable set of java.util.Locale instances.public java.net.URL getDocumentURL()
getDocumentURL in class NodeImplpublic java.lang.String getBaseURI()
getBaseURI in interface org.w3c.dom.NodegetBaseURI in class NodeImplpublic void setBaseURI(java.lang.String value)
public java.lang.String getDefaultTarget()
public void setDefaultTarget(java.lang.String value)
public org.w3c.dom.views.AbstractView getDefaultView()
getDefaultView in interface org.w3c.dom.views.DocumentView
public java.lang.String getTextContent()
throws org.w3c.dom.DOMException
NodeImpl
getTextContent in interface org.w3c.dom.NodegetTextContent in class NodeImplorg.w3c.dom.DOMException
public void setTextContent(java.lang.String textContent)
throws org.w3c.dom.DOMException
setTextContent in interface org.w3c.dom.NodesetTextContent in class NodeImplorg.w3c.dom.DOMExceptionpublic java.lang.String getTitle()
getTitle in interface org.w3c.dom.html2.HTMLDocumentpublic void setTitle(java.lang.String title)
setTitle in interface org.w3c.dom.html2.HTMLDocumentpublic java.lang.String getReferrer()
getReferrer in interface org.w3c.dom.html2.HTMLDocumentpublic void setReferrer(java.lang.String value)
public java.lang.String getDomain()
getDomain in interface org.w3c.dom.html2.HTMLDocumentpublic void setDomain(java.lang.String domain)
public org.w3c.dom.html2.HTMLElement getBody()
getBody in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.html2.HTMLCollection getImages()
getImages in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.html2.HTMLCollection getApplets()
getApplets in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.html2.HTMLCollection getLinks()
getLinks in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.html2.HTMLCollection getForms()
getForms in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.html2.HTMLCollection getFrames()
public org.w3c.dom.html2.HTMLCollection getAnchors()
getAnchors in interface org.w3c.dom.html2.HTMLDocumentpublic java.lang.String getCookie()
getCookie in interface org.w3c.dom.html2.HTMLDocument
public void setCookie(java.lang.String cookie)
throws org.w3c.dom.DOMException
setCookie in interface org.w3c.dom.html2.HTMLDocumentorg.w3c.dom.DOMExceptionpublic void open()
open in interface org.w3c.dom.html2.HTMLDocument
public void load()
throws java.io.IOException,
org.xml.sax.SAXException,
java.io.UnsupportedEncodingException
HTMLDocumentImpl was constructed.
It then closes the reader.
java.io.IOException
org.xml.sax.SAXException
java.io.UnsupportedEncodingException
public void load(boolean closeReader)
throws java.io.IOException,
org.xml.sax.SAXException,
java.io.UnsupportedEncodingException
java.io.IOException
org.xml.sax.SAXException
java.io.UnsupportedEncodingExceptionpublic void close()
close in interface org.w3c.dom.html2.HTMLDocumentpublic void write(java.lang.String text)
write in interface org.w3c.dom.html2.HTMLDocumentpublic void writeln(java.lang.String text)
writeln in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
name
attribute is elementName.
getElementsByName in interface org.w3c.dom.html2.HTMLDocumentpublic org.w3c.dom.DocumentType getDoctype()
getDoctype in interface org.w3c.dom.Documentpublic void setDoctype(org.w3c.dom.DocumentType doctype)
public org.w3c.dom.Element getDocumentElement()
getDocumentElement in interface org.w3c.dom.Document
public org.w3c.dom.Element createElement(java.lang.String tagName)
throws org.w3c.dom.DOMException
createElement in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic org.w3c.dom.DocumentFragment createDocumentFragment()
createDocumentFragment in interface org.w3c.dom.Documentpublic org.w3c.dom.Text createTextNode(java.lang.String data)
createTextNode in interface org.w3c.dom.Documentpublic org.w3c.dom.Comment createComment(java.lang.String data)
createComment in interface org.w3c.dom.Document
public org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
throws org.w3c.dom.DOMException
createCDATASection in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
java.lang.String data)
throws org.w3c.dom.DOMException
createProcessingInstruction in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.Attr createAttribute(java.lang.String name)
throws org.w3c.dom.DOMException
createAttribute in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
throws org.w3c.dom.DOMException
createEntityReference in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
getElementsByTagName in interface org.w3c.dom.Documenttagname - The element tag name or an asterisk
character (*) to match all elements.
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
boolean deep)
throws org.w3c.dom.DOMException
importNode in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
throws org.w3c.dom.DOMException
createElementNS in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
throws org.w3c.dom.DOMException
createAttributeNS in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
getElementsByTagNameNS in interface org.w3c.dom.Documentpublic org.w3c.dom.Element getElementById(java.lang.String elementId)
getElementById in interface org.w3c.dom.Documentpublic org.w3c.dom.Element namedItem(java.lang.String name)
public java.lang.String getInputEncoding()
getInputEncoding in interface org.w3c.dom.Documentpublic java.lang.String getXmlEncoding()
getXmlEncoding in interface org.w3c.dom.Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface org.w3c.dom.Document
public void setXmlStandalone(boolean xmlStandalone)
throws org.w3c.dom.DOMException
setXmlStandalone in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic java.lang.String getXmlVersion()
getXmlVersion in interface org.w3c.dom.Document
public void setXmlVersion(java.lang.String xmlVersion)
throws org.w3c.dom.DOMException
setXmlVersion in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface org.w3c.dom.Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface org.w3c.dom.Documentpublic java.lang.String getDocumentURI()
getDocumentURI in interface org.w3c.dom.Documentpublic void setDocumentURI(java.lang.String documentURI)
setDocumentURI in interface org.w3c.dom.Document
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
throws org.w3c.dom.DOMException
adoptNode in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic org.w3c.dom.DOMConfiguration getDomConfig()
getDomConfig in interface org.w3c.dom.Documentpublic void normalizeDocument()
normalizeDocument in interface org.w3c.dom.Document
public org.w3c.dom.Node renameNode(org.w3c.dom.Node n,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
throws org.w3c.dom.DOMException
renameNode in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic org.w3c.dom.DOMImplementation getImplementation()
getImplementation in interface org.w3c.dom.Documentpublic java.lang.String getLocalName()
getLocalName in interface org.w3c.dom.NodegetLocalName in class NodeImplpublic java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.NodegetNodeName in class NodeImplpublic short getNodeType()
getNodeType in interface org.w3c.dom.NodegetNodeType in class NodeImpl
public java.lang.String getNodeValue()
throws org.w3c.dom.DOMException
getNodeValue in interface org.w3c.dom.NodegetNodeValue in class NodeImplorg.w3c.dom.DOMException
public void setNodeValue(java.lang.String nodeValue)
throws org.w3c.dom.DOMException
setNodeValue in interface org.w3c.dom.NodesetNodeValue in class NodeImplorg.w3c.dom.DOMExceptionpublic final HtmlRendererContext getHtmlRendererContext()
getHtmlRendererContext in class NodeImplpublic UserAgentContext getUserAgentContext()
getUserAgentContext in class NodeImplpublic final java.net.URL getFullURL(java.lang.String uri)
getFullURL in interface ModelNodegetFullURL in class NodeImplpublic final org.lobobrowser.html.js.Location getLocation()
public void setLocation(java.lang.String location)
public java.lang.String getURL()
getURL in interface org.w3c.dom.html2.HTMLDocumentpublic void setBody(org.w3c.dom.html2.HTMLElement body)
setBody in interface org.w3c.dom.html2.HTMLDocumentpublic void allInvalidated(boolean forgetRenderStates)
public java.util.Collection getStyleSheets()
public void addDocumentNotificationListener(DocumentNotificationListener listener)
listener - An instance of DocumentNotificationListener.public void removeDocumentNotificationListener(DocumentNotificationListener listener)
public void sizeInvalidated(NodeImpl node)
public void lookInvalidated(NodeImpl node)
node - public void positionInParentInvalidated(NodeImpl node)
node - public void invalidated(NodeImpl node)
node - public void structureInvalidated(NodeImpl node)
node - public void nodeLoaded(NodeImpl node)
public void externalScriptLoading(NodeImpl node)
public void allInvalidated()
protected org.lobobrowser.html.style.RenderState createRenderState(org.lobobrowser.html.style.RenderState prevRenderState)
createRenderState in class NodeImpl
protected void loadImage(java.lang.String relativeUri,
ImageListener imageListener)
relativeUri - imageListener - public org.mozilla.javascript.Function getOnloadHandler()
public void setOnloadHandler(org.mozilla.javascript.Function onloadHandler)
public java.lang.Object setUserData(java.lang.String key,
java.lang.Object data,
org.w3c.dom.UserDataHandler handler)
setUserData in interface org.w3c.dom.NodesetUserData in class NodeImplprotected org.w3c.dom.Node createSimilarNode()
NodeImpl
createSimilarNode in class NodeImpl
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||