|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.scripting.sai.BaseNode
public class BaseNode
The base representation of any VRML node in the system whether built in or a proto.
May be used as a standalone node, or extended with the abstract data types defined by higher levels of the SAI conformance.
| Field Summary | |
|---|---|
protected boolean |
accessPermitted
Flag for determining the read/write timing ability |
protected java.lang.ref.ReferenceQueue |
fieldQueue
Reference queue used for keeping track of field object instances |
protected java.util.HashMap |
fieldRefMap
Map containing the field name as key and a SoftReference instance that points to the field object. |
protected VRMLNodeType |
realNode
This is the real node that this object represents |
| Constructor Summary | |
|---|---|
BaseNode(VRMLNodeType node,
java.lang.ref.ReferenceQueue refQueue,
FieldFactory fac,
FieldAccessListener fal,
BaseNodeFactory bnf)
Create a new basic node implementation. |
|
| Method Summary | |
|---|---|
protected void |
checkAccess()
Convenience method to check if the node may be accessed at this point in time. |
void |
dispose()
Dispose of this node's resources. |
boolean |
equals(java.lang.Object obj)
Compare this node for equality to another. |
X3DField |
getField(java.lang.String name)
Get a field for this node. |
X3DFieldDefinition[] |
getFieldDefinitions()
Get the list of fields that this node contains. |
X3DMetadataObject |
getMetadata()
Get the metadata object associated with this node. |
java.lang.String |
getNodeName()
Get the type of this node. |
int[] |
getNodeType()
Get the basic categorisation type(s) of this node. |
int |
hashCode()
Generate the hashcode for this object. |
boolean |
isRealized()
Check to see if this node has completed its setup either by being directly informed of it or through implicit measures (see the specification for details). |
void |
realize()
Notify this node that its setup stage is now complete. |
void |
setMetadata(X3DMetadataObject node)
Set the Metadata object that belongs to this node. |
java.lang.String |
toString()
Generate a string version of this node's representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected VRMLNodeType realNode
protected java.util.HashMap fieldRefMap
protected java.lang.ref.ReferenceQueue fieldQueue
protected boolean accessPermitted
| Constructor Detail |
|---|
public BaseNode(VRMLNodeType node,
java.lang.ref.ReferenceQueue refQueue,
FieldFactory fac,
FieldAccessListener fal,
BaseNodeFactory bnf)
node - The source node this is wrappingrefQueue - The queue used for dealing with field referencesfac - Factory used to create field wrappersfal - The access listener for propogating s2 requestsbnf - The factory used to create node wrappers| Method Detail |
|---|
public void setMetadata(X3DMetadataObject node)
throws InvalidNodeException
setMetadata in interface X3DNodenode - The new node instance to use
InvalidNodeException
public X3DMetadataObject getMetadata()
throws InvalidNodeException
getMetadata in interface X3DNodeInvalidNodeException
public java.lang.String getNodeName()
throws InvalidNodeException
getNodeName in interface X3DNodeInvalidNodeException - The node has had it's resources
disposed of
public X3DFieldDefinition[] getFieldDefinitions()
throws InvalidNodeException
getFieldDefinitions in interface X3DNodeInvalidNodeException - The node has had it's resources
disposed of
public void realize()
throws InvalidNodeException
realize in interface X3DNodeInvalidNodeException - The node has had it's resources
disposed of
public boolean isRealized()
throws InvalidNodeException
isRealized in interface X3DNodeInvalidNodeException - The node has had it's resources
disposed of
public int[] getNodeType()
throws InvalidNodeException
getNodeType in interface X3DNodeInvalidNodeException - The node has had it's resources
disposed of
public X3DField getField(java.lang.String name)
throws InvalidFieldException,
InvalidNodeException
If the basic field required is an exposedField you can use either the standard name (such as translation) or you can use the set_ / _changed modifier (such as set_translation). If the field asked for is of field access type then an object is returned that cannot be read or written to. However, this allows the option for building editor type applications that may permit reading and writing of field access types when not running the VRML event model.
getField in interface X3DNodename - The name of the field that is required
InvalidFieldException - The named field does not exist for
this node.
InvalidNodeException - The node has had it's resources disposed
of
public void dispose()
throws InvalidNodeException
This in no way implies that the browser is to remove this node from the scene graph, only that the java code is no longer interested in this particular node through this reference.
Once this method has been called, any further calls to methods of this instance of the class is shall generate an InvalidNodeException.
dispose in interface X3DNodeInvalidNodeException - The node is no longer valid and can't be
disposed of again.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to compare against
public java.lang.String toString()
throws InvalidNodeException
toString in class java.lang.ObjectInvalidNodeExceptionprotected void checkAccess()
InvalidNodeException - The node handle is no longer valid
InvalidOperationTimingException - Can't access the node
at this point in time
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||