|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.dom.AbstractNode | +--org.apache.batik.dom.AbstractParentNode
This class implements the Node interface with support for children.
Inner Class Summary | |
protected class |
AbstractParentNode.ChildNodes
To manage the children of this node. |
protected class |
AbstractParentNode.ElementsByTagName
To manage a list of nodes. |
protected class |
AbstractParentNode.ElementsByTagNameNS
To manage a list of nodes. |
Field Summary | |
protected AbstractParentNode.ChildNodes |
childNodes
The children. |
Fields inherited from class org.apache.batik.dom.AbstractNode |
EMPTY_NODE_LIST, eventSupport, ownerDocument |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
AbstractParentNode()
|
Method Summary | |
Node |
appendChild(Node newChild)
DOM: Implements Node.appendChild(Node) . |
protected void |
checkAndRemove(Node n,
boolean replace)
Checks the validity of a node to be inserted, and removes it from the document if needed. |
protected Node |
deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node. |
protected Node |
deepExport(Node n,
AbstractDocument d)
Deeply exports this node to the given document. |
protected void |
fireDOMNodeInsertedEvent(Node node)
Fires a DOMNodeInserted event. |
void |
fireDOMNodeInsertedIntoDocumentEvent()
Recursively fires a DOMNodeInsertedIntoDocument event. |
protected void |
fireDOMNodeRemovedEvent(Node node)
Fires a DOMNodeRemoved event. |
void |
fireDOMNodeRemovedFromDocumentEvent()
Recursively fires a DOMNodeRemovedFromDocument event. |
protected void |
fireDOMSubtreeModifiedEvent()
Fires a DOMSubtreeModified event. |
NodeList |
getChildNodes()
DOM: Implements Node.getChildNodes() . |
NodeList |
getElementsByTagName(java.lang.String name)
DOM: Implements Element.getElementsByTagName(String) . |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM: Implements Element.getElementsByTagNameNS(String,String) . |
Node |
getFirstChild()
DOM: Implements Node.getFirstChild() . |
Node |
getLastChild()
DOM: Implements Node.getLastChild() . |
boolean |
hasChildNodes()
DOM: Implements Node.hasChildNodes() . |
Node |
insertBefore(Node newChild,
Node refChild)
DOM: Implements Node.insertBefore(Node, Node) . |
protected void |
nodeAdded(Node n)
Called when a child node has been added. |
protected void |
nodeToBeRemoved(Node n)
Called when a child node is going to be removed. |
void |
normalize()
DOM: Implements Node.normalize() . |
Node |
removeChild(Node oldChild)
DOM: Implements Node.removeChild(Node) . |
Node |
replaceChild(Node newChild,
Node oldChild)
DOM: Implements Node.replaceChild(Node, Node) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.batik.dom.ExtendedNode |
isReadonly, setReadonly |
Methods inherited from interface org.w3c.dom.Node |
getNodeName, getNodeType |
Field Detail |
protected AbstractParentNode.ChildNodes childNodes
Constructor Detail |
public AbstractParentNode()
Method Detail |
public NodeList getChildNodes()
Node.getChildNodes()
.getChildNodes
in class AbstractNode
childNodes
public Node getFirstChild()
Node.getFirstChild()
.getFirstChild
in class AbstractNode
childNodes
.firstChildpublic Node getLastChild()
Node.getLastChild()
.getLastChild
in class AbstractNode
childNodes
.lastChildpublic Node insertBefore(Node newChild, Node refChild) throws DOMException
Node.insertBefore(Node, Node)
.insertBefore
in class AbstractNode
org.w3c.dom.Node
newChildThe
- node to insert.refChildThe
- reference node, i.e., the node before which the new
node must be inserted.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to insert is one of this node's ancestors.
newChild
was created
from a different document than the one that created this node.
refChild
is not a child of
this node.public Node replaceChild(Node newChild, Node oldChild) throws DOMException
Node.replaceChild(Node, Node)
.replaceChild
in class AbstractNode
org.w3c.dom.Node
newChildThe
- new node to put in the child list.oldChildThe
- node being replaced in the list.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to put in is one of this node's ancestors.
newChild
was created
from a different document than the one that created this node.
oldChild
is not a child of
this node.public Node removeChild(Node oldChild) throws DOMException
Node.removeChild(Node)
.removeChild
in class AbstractNode
org.w3c.dom.Node
oldChildThe
- node being removed.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
oldChild
is not a child of
this node.public Node appendChild(Node newChild) throws DOMException
Node.appendChild(Node)
.appendChild
in class AbstractNode
org.w3c.dom.Node
newChildThe
- node to add.If it is a DocumentFragment
object, the entire contents of the document fragment are moved
into the child list of this nodeDOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild
node, or if
the node to append is one of this node's ancestors.
newChild
was created
from a different document than the one that created this node.
public boolean hasChildNodes()
Node.hasChildNodes()
.hasChildNodes
in class AbstractNode
public void normalize()
Node.normalize()
.normalize
in class AbstractNode
public NodeList getElementsByTagName(java.lang.String name)
Element.getElementsByTagName(String)
.public NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
Element.getElementsByTagNameNS(String,String)
.public void fireDOMNodeInsertedIntoDocumentEvent()
fireDOMNodeInsertedIntoDocumentEvent
in class AbstractNode
public void fireDOMNodeRemovedFromDocumentEvent()
fireDOMNodeRemovedFromDocumentEvent
in class AbstractNode
protected void nodeAdded(Node n)
protected void nodeToBeRemoved(Node n)
protected Node deepExport(Node n, AbstractDocument d)
deepExport
in class AbstractNode
protected Node deepCopyInto(Node n)
deepCopyInto
in class AbstractNode
n
- a node of the type of this.protected void fireDOMSubtreeModifiedEvent()
protected void fireDOMNodeInsertedEvent(Node node)
protected void fireDOMNodeRemovedEvent(Node node)
protected void checkAndRemove(Node n, boolean replace)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |