|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jclientpages.page.dom.ClientPageNode
public class ClientPageNode
A wrapper of JSObject representing each element in the page DOM.
This class contains some facility methods for common operations
| Constructor Summary | |
|---|---|
ClientPageNode(netscape.javascript.JSObject iJsObject)
creates a ClientPageNode that wraps the given JSObject |
|
| Method Summary | |
|---|---|
ClientPageNode |
appendChild(ClientPageNode node)
appends a new child node to the current node |
ClientPageNode |
appendChild(java.lang.String tagName)
creates a new child node and appends it in the current node |
void |
appendTextChild(java.lang.String text)
appends a new text child to the current node |
netscape.javascript.JSObject |
asJSObject()
returns the wrapped JSObject |
java.lang.Object |
call(java.lang.String functionName,
java.lang.Object[] args)
calls a function on the current node |
void |
clear()
removes all the child nodes of this node |
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
getAttribute(java.lang.String name)
returns the value of an attribute of the current node |
ClientPageNode[] |
getChildren()
returns the child nodes |
java.lang.String |
getInnerHTML()
retruns the inner HTML of the current node |
ClientPageNode |
getParent()
returns the parent node of this node |
ClientPageNodeStyle |
getStyle()
returns an object representing the node style. |
int |
hashCode()
|
boolean |
isTag()
returns true if this node is an HTML tag |
void |
remove()
removes this node from the document DOM |
void |
removeChild(ClientPageNode node)
removes a child node |
java.lang.Object |
removeChild(int index)
removes a child node given its position |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
sets an attribute value on the current value |
void |
setInnerHTML(java.lang.String innerHtml)
sets the inner HTML of the current node |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientPageNode(netscape.javascript.JSObject iJsObject)
iJsObject - the JSObject to be wrapped| Method Detail |
|---|
public netscape.javascript.JSObject asJSObject()
public java.lang.Object getAttribute(java.lang.String name)
name - the attribute name
public void setAttribute(java.lang.String name,
java.lang.Object value)
name - the attribute namevalue - the new attribute valuepublic java.lang.String getInnerHTML()
public void setInnerHTML(java.lang.String innerHtml)
innerHtml - the new inner HTML
public java.lang.Object call(java.lang.String functionName,
java.lang.Object[] args)
functionName - the function nameargs - the function argument values
public ClientPageNode getParent()
public ClientPageNode[] getChildren()
public java.lang.Object removeChild(int index)
index - the position of the child node to be eliminated
public void removeChild(ClientPageNode node)
node - the node to be removedpublic void clear()
public void remove()
public ClientPageNode appendChild(java.lang.String tagName)
tagName - the tag name of the child node
public ClientPageNode appendChild(ClientPageNode node)
node - the new child
public void appendTextChild(java.lang.String text)
text - the content of the text childpublic boolean isTag()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic ClientPageNodeStyle getStyle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||