IDOMDocument Interface
- public interface IDOMDocument
extends IDOMNode
-
All Superinterfaces
-
IDOMNode
-
All Known Subinterfaces
-
IJspDocument
Methods from interface com.bea.ide.lang.jsp.IDOMNode |
appendChild , decodeNodeValue , encodeNodeValue , getChildCount , getChildNode , getFirstChild , getLastChild , getNodeName , getNodeValue , getOwnerDocument , getParentNode , insertAfter , insertBefore , isReadOnly , matches , nextSibling , normalize , previousSibling , reformat , removeChild , setNodeValue
|
beginEdit() Method
public void beginEdit()
Allows batching up of a set of changes, so that each DOM modification is not
immediately reflected in the designer.
This method may be called multiple times.
IDOMDocument.endEdit()
must be once for each call to beginEdit
createCompatibleDocument() Method
public IDOMDocument
createCompatibleDocument()
Create a new document of the same type (JSP/HTML) as this document.
This document is to be used to create fragments of JSP code for use on
a clipboard, or in other places that a JSP fragment is needed.
createElement(Class, String) Method
public IDOMElement
createElement(Class
clazz,
String
strTagName)
Creates an element with the specified tag name.
Parameters
-
clazz
- Interface of the element to be created. e.g.
IHTMLElement
.class, IJspAction
.class.
-
strTagName
- name of the element e.g. "body"
createNode(Class) Method
public IDOMNode
createNode(Class
clazz)
Creates a node of the specified type. Use IDOMDocument.createElement(Class, String)
to create elements.
Parameters
-
clazz
- The interface which the newly created node must implement
createTextNode(String) Method
public IDOMTextNode
createTextNode(String
str)
Creates a new text node with the specified value.
Equivalent to
createNode(IDOMTextNode.class);
setNodeValue(str);
Parameters
-
str
- text of the new node.
endEdit() Method
public void endEdit()
Must be called after a call to IDOMDocument.beginEdit()
getDocumentURI() Method
public URI
getDocumentURI()
Returns the URI of the document that is being edited.
This URI may be used to determine whether this is a JSP or HTML document.
Furthermore, when nodes are imported into other documents, this URI is used
to resolve relative paths.
getElementsByTagName(Class, String) Method
public IDOMNodeList
getElementsByTagName(Class
clazz,
String
strTagName)
Return a list of all of the nodes in the tree implementing the specified interface, and having the specified tagName.
Parameters
-
clazz
- interface which the returned nodes must implement, or null to get all of the nodes
-
strTagName
- tag name which the elements must have, or null to retrieve all matching nodes and elements.
Can be
null
to get all nodes which match clazz
strTagName
may or may not be case sensitive, depending on the type of element.
getSelectedNode() Method
public IDOMNode
getSelectedNode()
Returns the currently selected node in the designer
importNode(IDOMNode, boolean) Method
public IDOMNode
importNode(IDOMNode
node,
boolean fDeep)
Imports a node into this document.
If the node is already in this document, then duplicates the node.
Parameters
-
node
- node to be imported
-
fDeep
- if true, then node and its children are imported, otherwise, just this node (and potentially its attributes) is imported
selectNode(IDOMNode) Method
public void selectNode(IDOMNode
node)
Select the node in the designer.
Parameters
-
node
- node to to be selected