org.lobobrowser.html.domimpl
public abstract class NodeImpl extends AbstractScriptableDelegate implements org.w3c.dom.Node, ModelNode
| Modifier and Type | Field and Description |
|---|---|
protected org.w3c.dom.Document |
document |
protected static java.util.logging.Logger |
logger |
protected java.util.ArrayList |
nodeList |
protected boolean |
notificationsSuspended |
protected org.w3c.dom.Node |
parentNode |
protected java.lang.Object |
treeLock
A tree lock is less deadlock-prone than
a node-level lock.
|
protected UINode |
uiNode |
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 and Description |
|---|
NodeImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node newChild) |
protected void |
appendInnerHTMLImpl(java.lang.StringBuffer buffer) |
protected void |
appendInnerTextImpl(java.lang.StringBuffer buffer) |
org.w3c.dom.Node |
cloneNode(boolean deep) |
short |
compareDocumentPosition(org.w3c.dom.Node other) |
protected RenderState |
createRenderState(RenderState prevRenderState) |
protected abstract org.w3c.dom.Node |
createSimilarNode()
Should create a node with some cloned properties, like the node name,
but not attributes or children.
|
boolean |
equalAttributes(org.w3c.dom.Node arg) |
UINode |
findUINode()
Tries to get a UINode associated with the current node.
|
protected void |
forgetRenderState() |
float |
getAlignmentX() |
float |
getAlignmentY() |
org.w3c.dom.NamedNodeMap |
getAttributes() |
java.lang.String |
getBaseURI() |
org.w3c.dom.NodeList |
getChildNodes() |
ChildHTMLCollection |
getChildren() |
NodeImpl[] |
getChildrenArray() |
java.util.ArrayList |
getDescendents(NodeFilter filter,
boolean nestIntoMatchingNodes)
Creates an
ArrayList of descendent nodes that
the given filter condition. |
java.lang.Object |
getDocumentItem(java.lang.String name) |
java.net.URL |
getDocumentURL() |
java.lang.Object |
getFeature(java.lang.String feature,
java.lang.String version) |
org.w3c.dom.Node |
getFirstChild() |
java.net.URL |
getFullURL(java.lang.String spec) |
HtmlRendererContext |
getHtmlRendererContext() |
java.lang.String |
getInnerHTML() |
java.lang.String |
getInnerText()
Attempts to convert the subtree starting at this point to a close text
representation.
|
org.w3c.dom.Node |
getLastChild() |
abstract java.lang.String |
getLocalName() |
java.lang.String |
getNamespaceURI() |
org.w3c.dom.Node |
getNextSibling() |
protected org.w3c.dom.NodeList |
getNodeList(NodeFilter filter) |
abstract java.lang.String |
getNodeName() |
abstract short |
getNodeType() |
abstract java.lang.String |
getNodeValue() |
org.w3c.dom.Document |
getOwnerDocument() |
ModelNode |
getParentModelNode() |
org.w3c.dom.Node |
getParentNode() |
protected RenderState |
getParentRenderState(java.lang.Object parent) |
java.lang.String |
getPrefix() |
org.w3c.dom.Node |
getPreviousSibling() |
RenderState |
getRenderState() |
java.lang.String |
getTextContent()
Gets the text content of this node
and its descendents.
|
UINode |
getUINode() |
UserAgentContext |
getUserAgentContext() |
java.lang.Object |
getUserData(java.lang.String key) |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
protected java.lang.String |
htmlEncodeChildText(java.lang.String text) |
void |
informDocumentInvalid() |
protected void |
informExternalScriptLoading() |
void |
informInvalid() |
void |
informLayoutInvalid() |
void |
informLookInvalid() |
protected void |
informNodeLoaded() |
void |
informPositionInvalid() |
void |
informSizeInvalid() |
void |
informStructureInvalid() |
org.w3c.dom.Node |
insertAfter(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild) |
protected org.w3c.dom.Node |
insertAt(org.w3c.dom.Node newChild,
int idx) |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild) |
boolean |
isDefaultNamespace(java.lang.String namespaceURI) |
boolean |
isEqualNode(org.w3c.dom.Node arg) |
boolean |
isEqualOrDescendentOf(ModelNode otherContext) |
boolean |
isSameNode(org.w3c.dom.Node other) |
boolean |
isSupported(java.lang.String feature,
java.lang.String version) |
java.lang.String |
lookupNamespaceURI(java.lang.String prefix) |
java.lang.String |
lookupPrefix(java.lang.String namespaceURI) |
void |
normalize() |
protected void |
removeAllChildren() |
protected void |
removeAllChildrenImpl() |
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild) |
org.w3c.dom.Node |
removeChildAt(int index) |
protected void |
removeChildren(NodeFilter filter) |
protected void |
removeChildrenImpl(NodeFilter filter) |
org.w3c.dom.Text |
replaceAdjacentTextNodes(org.w3c.dom.Text node) |
org.w3c.dom.Text |
replaceAdjacentTextNodes(org.w3c.dom.Text node,
java.lang.String textContent) |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild) |
void |
setDocumentItem(java.lang.String name,
java.lang.Object value)
Sets a document item.
|
abstract void |
setNodeValue(java.lang.String nodeValue) |
void |
setPrefix(java.lang.String prefix) |
void |
setTextContent(java.lang.String textContent) |
void |
setUINode(UINode uiNode) |
java.lang.Object |
setUserData(java.lang.String key,
java.lang.Object data,
org.w3c.dom.UserDataHandler handler) |
java.lang.String |
toString() |
void |
warn(java.lang.String message) |
void |
warn(java.lang.String message,
java.lang.Throwable err) |
getScriptable, setScriptableprotected static final java.util.logging.Logger logger
protected UINode uiNode
protected java.util.ArrayList nodeList
protected volatile org.w3c.dom.Document document
protected volatile java.lang.Object treeLock
protected volatile boolean notificationsSuspended
protected volatile org.w3c.dom.Node parentNode
public void setUINode(UINode uiNode)
public UINode getUINode()
public UINode findUINode()
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
throws org.w3c.dom.DOMException
appendChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionprotected void removeAllChildren()
protected void removeAllChildrenImpl()
protected org.w3c.dom.NodeList getNodeList(NodeFilter filter)
public NodeImpl[] getChildrenArray()
public ChildHTMLCollection getChildren()
public java.util.ArrayList getDescendents(NodeFilter filter, boolean nestIntoMatchingNodes)
ArrayList of descendent nodes that
the given filter condition.protected abstract org.w3c.dom.Node createSimilarNode()
public org.w3c.dom.Node cloneNode(boolean deep)
cloneNode in interface org.w3c.dom.Nodepublic short compareDocumentPosition(org.w3c.dom.Node other)
throws org.w3c.dom.DOMException
compareDocumentPosition in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic org.w3c.dom.NamedNodeMap getAttributes()
getAttributes in interface org.w3c.dom.Nodepublic org.w3c.dom.Document getOwnerDocument()
getOwnerDocument in interface org.w3c.dom.Nodepublic org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
throws org.w3c.dom.DOMException
insertBefore in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionprotected org.w3c.dom.Node insertAt(org.w3c.dom.Node newChild,
int idx)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
replaceChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
removeChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Node removeChildAt(int index)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.Nodepublic java.lang.String getBaseURI()
getBaseURI in interface org.w3c.dom.Nodepublic org.w3c.dom.NodeList getChildNodes()
getChildNodes in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getLastChild()
getLastChild in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getPreviousSibling()
getPreviousSibling in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.Nodepublic java.lang.Object getFeature(java.lang.String feature,
java.lang.String version)
getFeature in interface org.w3c.dom.Nodepublic java.lang.Object setUserData(java.lang.String key,
java.lang.Object data,
org.w3c.dom.UserDataHandler handler)
setUserData in interface org.w3c.dom.Nodepublic java.lang.Object getUserData(java.lang.String key)
getUserData in interface org.w3c.dom.Nodepublic abstract java.lang.String getLocalName()
getLocalName in interface org.w3c.dom.Nodepublic boolean hasAttributes()
hasAttributes in interface org.w3c.dom.Nodepublic java.lang.String getNamespaceURI()
getNamespaceURI in interface org.w3c.dom.Nodepublic abstract java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.Nodepublic abstract java.lang.String getNodeValue()
throws org.w3c.dom.DOMException
getNodeValue in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic java.lang.String getPrefix()
getPrefix in interface org.w3c.dom.Nodepublic void setPrefix(java.lang.String prefix)
throws org.w3c.dom.DOMException
setPrefix in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic abstract void setNodeValue(java.lang.String nodeValue)
throws org.w3c.dom.DOMException
setNodeValue in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic abstract short getNodeType()
getNodeType in interface org.w3c.dom.Nodepublic java.lang.String getTextContent()
throws org.w3c.dom.DOMException
getTextContent in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic void setTextContent(java.lang.String textContent)
throws org.w3c.dom.DOMException
setTextContent in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionprotected void removeChildren(NodeFilter filter)
protected void removeChildrenImpl(NodeFilter filter)
public org.w3c.dom.Node insertAfter(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
public org.w3c.dom.Text replaceAdjacentTextNodes(org.w3c.dom.Text node,
java.lang.String textContent)
public org.w3c.dom.Text replaceAdjacentTextNodes(org.w3c.dom.Text node)
public org.w3c.dom.Node getParentNode()
getParentNode in interface org.w3c.dom.Nodepublic boolean isSameNode(org.w3c.dom.Node other)
isSameNode in interface org.w3c.dom.Nodepublic boolean isSupported(java.lang.String feature,
java.lang.String version)
isSupported in interface org.w3c.dom.Nodepublic java.lang.String lookupNamespaceURI(java.lang.String prefix)
lookupNamespaceURI in interface org.w3c.dom.Nodepublic boolean equalAttributes(org.w3c.dom.Node arg)
public boolean isEqualNode(org.w3c.dom.Node arg)
isEqualNode in interface org.w3c.dom.Nodepublic boolean isDefaultNamespace(java.lang.String namespaceURI)
isDefaultNamespace in interface org.w3c.dom.Nodepublic java.lang.String lookupPrefix(java.lang.String namespaceURI)
lookupPrefix in interface org.w3c.dom.Nodepublic void normalize()
normalize in interface org.w3c.dom.Nodepublic java.lang.String toString()
toString in class java.lang.Objectpublic UserAgentContext getUserAgentContext()
public HtmlRendererContext getHtmlRendererContext()
public float getAlignmentX()
public float getAlignmentY()
public java.net.URL getFullURL(java.lang.String spec)
throws java.net.MalformedURLException
getFullURL in interface ModelNodejava.net.MalformedURLExceptionpublic java.net.URL getDocumentURL()
public java.lang.Object getDocumentItem(java.lang.String name)
getDocumentItem in interface ModelNodepublic void setDocumentItem(java.lang.String name,
java.lang.Object value)
ModelNodesetDocumentItem in interface ModelNodepublic final boolean isEqualOrDescendentOf(ModelNode otherContext)
isEqualOrDescendentOf in interface ModelNodepublic final ModelNode getParentModelNode()
getParentModelNode in interface ModelNodepublic void warn(java.lang.String message,
java.lang.Throwable err)
public void warn(java.lang.String message)
public void informSizeInvalid()
public void informLookInvalid()
public void informPositionInvalid()
public void informInvalid()
public void informStructureInvalid()
protected void informNodeLoaded()
protected void informExternalScriptLoading()
public void informLayoutInvalid()
public void informDocumentInvalid()
public RenderState getRenderState()
getRenderState in interface ModelNodeprotected final RenderState getParentRenderState(java.lang.Object parent)
protected RenderState createRenderState(RenderState prevRenderState)
protected void forgetRenderState()
public java.lang.String getInnerHTML()
protected void appendInnerHTMLImpl(java.lang.StringBuffer buffer)
protected java.lang.String htmlEncodeChildText(java.lang.String text)
public java.lang.String getInnerText()
protected void appendInnerTextImpl(java.lang.StringBuffer buffer)