|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRhinohide
RhiEventTarget
RhiNode
@ThreadSafe public abstract class RhiNode
A node implemented as an overlay of a JavaScript node.
Affects IE and particular orderings of node insert/append. When populating a newly created node, you may have to insert/append its children prior to inserting the new node in its own, higher parent. Otherwise the insert/append may throw a JSException, "Unexpected call to method or property access." See for example the source code of populateAndInsert, in RhiDocumentFragment_1.
Suspect Java Plug-In bug, specific to IE.
Field Summary |
---|
Fields inherited from class Rhinohide |
---|
window |
Constructor Summary | |
---|---|
RhiNode(RhiWindow window,
netscape.javascript.JSObject jsObject)
|
Method Summary | |
---|---|
Node |
appendChild(Node newChild)
|
Node |
cloneNode(boolean deep)
|
short |
compareDocumentPosition(Node other)
Not yet coded. |
protected static void |
ensureNodeType(Rhinohide rhinohide,
short nodeType)
|
boolean |
equals(Object o)
Returns true iff o is a RhiNode, and wraps the same JavaScript node, according to Node.isSameNode(). |
NamedNodeMap |
getAttributes()
|
String |
getBaseURI()
Untested. |
NodeList |
getChildNodes()
|
Object |
getFeature(String feature,
String version)
Not yet coded. |
Node |
getFirstChild()
|
Node |
getLastChild()
|
String |
getLocalName()
|
String |
getNamespaceURI()
|
Node |
getNextSibling()
|
String |
getNodeName()
|
short |
getNodeType()
|
static short |
getNodeType(Rhinohide rhinohide)
Returns the node type of a JavaScript node. |
String |
getNodeValue()
|
Document |
getOwnerDocument()
|
Node |
getParentNode()
|
String |
getPrefix()
Untested. |
Node |
getPreviousSibling()
|
String |
getTextContent()
Untested. |
Object |
getUserData(String key)
Not yet coded. |
boolean |
hasAttributes()
Untested. |
boolean |
hasChildNodes()
|
int |
hashCode()
Not yet coded, non-trivial. |
Node |
insertBefore(Node newChild,
Node refChild)
|
boolean |
isDefaultNamespace(String namespaceURI)
|
boolean |
isEqualNode(Node arg)
Untested. |
boolean |
isSameNode(Node other)
|
boolean |
isSupported(String feature,
String version)
|
String |
lookupNamespaceURI(String prefix)
Untested. |
String |
lookupPrefix(String namespaceURI)
|
void |
normalize()
|
Node |
removeChild(Node oldChild)
|
Node |
replaceChild(Node newChild,
Node oldChild)
|
void |
setNodeValue(String value)
|
void |
setPrefix(String prefix)
Not yet coded. |
void |
setTextContent(String textContent)
Not yet coded. |
Object |
setUserData(String key,
Object data,
UserDataHandler handler)
Not yet coded. |
static RhiNode |
wrapNode(RhiWindow window,
netscape.javascript.JSObject jsObject)
Creates a RhiNode. |
static RhiNode |
wrapNode(RhiWindow window,
netscape.javascript.JSObject jsObject,
short nodeType)
Creates a RhiNode of a specified node type. |
Methods inherited from class RhiEventTarget |
---|
addEventListener, dispatchEvent, removeEventListener, wrapEventTarget |
Methods inherited from class Rhinohide |
---|
call, callV, checkV, eval, evalV, getMember, getMemberV, jsObject, setMember, toJSObject, toString, window |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
RhiNode(RhiWindow window, netscape.javascript.JSObject jsObject)
Method Detail |
---|
public static RhiNode wrapNode(RhiWindow window, netscape.javascript.JSObject jsObject)
window
- global objectjsObject
- bridge to underlying JavaScript node,
per jsObject()
StunnedRhinoException
- if jsObject is non-null,
and has no 'nodeType' propertypublic static RhiNode wrapNode(RhiWindow window, netscape.javascript.JSObject jsObject, short nodeType)
window
- global objectjsObject
- bridge to underlying JavaScript node,
per jsObject()nodeType
- jsObject's node typepublic final Node appendChild(Node newChild)
appendChild
in interface Node
public final Node cloneNode(boolean deep)
cloneNode
in interface Node
public final short compareDocumentPosition(Node other)
compareDocumentPosition
in interface Node
UnsupportedOperationException
public final NamedNodeMap getAttributes()
getAttributes
in interface Node
public final String getBaseURI()
getBaseURI
in interface Node
public final NodeList getChildNodes()
getChildNodes
in interface Node
public final Object getFeature(String feature, String version)
getFeature
in interface Node
UnsupportedOperationException
public final Node getFirstChild()
getFirstChild
in interface Node
public final Node getLastChild()
getLastChild
in interface Node
public String getLocalName()
getLocalName
in interface Node
public final String getNamespaceURI()
getNamespaceURI
in interface Node
public final String getNodeName()
getNodeName
in interface Node
public final short getNodeType()
getNodeType
in interface Node
public static short getNodeType(Rhinohide rhinohide)
rhinohide
- of JavaScript node
StunnedRhinoException
- if jsObject is non-null,
and has no 'nodeType' propertypublic final String getNodeValue()
getNodeValue
in interface Node
public final void setNodeValue(String value)
setNodeValue
in interface Node
public final Document getOwnerDocument()
getOwnerDocument
in interface Node
public final Node getParentNode()
getParentNode
in interface Node
public final String getPrefix()
getPrefix
in interface Node
public final void setPrefix(String prefix)
setPrefix
in interface Node
UnsupportedOperationException
public final Node getPreviousSibling()
getPreviousSibling
in interface Node
public final Node getNextSibling()
getNextSibling
in interface Node
public final String getTextContent()
getTextContent
in interface Node
public final void setTextContent(String textContent)
setTextContent
in interface Node
UnsupportedOperationException
public final boolean hasAttributes()
hasAttributes
in interface Node
public final boolean hasChildNodes()
hasChildNodes
in interface Node
public final Node insertBefore(Node newChild, Node refChild)
insertBefore
in interface Node
public final boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace
in interface Node
public final boolean isEqualNode(Node arg)
isEqualNode
in interface Node
public final boolean isSameNode(Node other)
isSameNode
in interface Node
public final boolean isSupported(String feature, String version)
isSupported
in interface Node
public final String lookupNamespaceURI(String prefix)
lookupNamespaceURI
in interface Node
public final String lookupPrefix(String namespaceURI)
lookupPrefix
in interface Node
public final void normalize()
normalize
in interface Node
public final Node removeChild(Node oldChild)
removeChild
in interface Node
public final Node replaceChild(Node newChild, Node oldChild)
replaceChild
in interface Node
public final Object getUserData(String key)
getUserData
in interface Node
UnsupportedOperationException
public final Object setUserData(String key, Object data, UserDataHandler handler)
setUserData
in interface Node
UnsupportedOperationException
public boolean equals(Object o)
equals
in class Rhinohide
public int hashCode()
hashCode
in class Rhinohide
UnsupportedOperationException
protected static void ensureNodeType(Rhinohide rhinohide, short nodeType)
IllegalArgumentException
- if jsObject is not a DOM node of nodeType
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |