All Packages Class Hierarchy This Package Previous Next Index
Class vlc.vrml.internal.util.VrmlTrace
java.lang.Object
|
+----vlc.vrml.internal.util.VrmlTrace
- public class VrmlTrace
- extends Object
VermelTrap VRML 2.0 Editor
- Version:
- 0.6 Beta 3
Copyright 1997
The Virtual Light Company
under the
GNU LGPL
The latest information and bugs in VermelTrap can be found at
http://www.vlc.com.au/VermelTrap/
This class is designed to be inserted into a VrmlScene at any point and
forms a formatted string that represents the scene graph existing below that
node.
This version is designed for use with the Java Script API. To use the class
simply include it in your import line and then you have one of two options;
- If you wish to continually monitor a single node and its contents, you
can create an instance of this class with the node that you want to follow
in the constructor. To get a printout at any time, simply call the toString()
method.
- If you just want to check on an individual node, you can call the static
version of toString with the node as the argumnet. You end up with the
same result, just it allows you to be more flexible
- Author:
- Justin Couch justin@vlc.com.au
-
VrmlTrace()
- Create a default VermelTrap.
-
VrmlTrace(Node)
- Create the tracer and set the root node to the given node.
-
setRootNode(Node)
- Set the root node to a new value.
-
toString()
- Take the nominated root node and print out the scene graph that exists
underneath it.
-
toString(Node)
- Take the nominated node and print out the scene graph that exists
underneath it.
VrmlTrace
public VrmlTrace()
- Create a default VermelTrap. The root node is set to null
VrmlTrace
public VrmlTrace(Node rootNode)
- Create the tracer and set the root node to the given node.
- Parameters:
- rootNode - A reference to a Node that will be used as the root of
the tracing
setRootNode
public void setRootNode(Node node)
- Set the root node to a new value. This can be anything - even null
- Parameters:
- node - The new node to use as the root.
toString
public String toString()
- Take the nominated root node and print out the scene graph that exists
underneath it. It works on a recursive system, so it will trace to the
depth that you require.
If the root node is null then the string "No root Node defined" is
returned.
- Returns:
- A formatted string representing the scene graph.
- Overrides:
- toString in class Object
toString
public static String toString(Node node)
- Take the nominated node and print out the scene graph that exists
underneath it. It works on a recursive system, so it will trace to the
depth that you require.
If the root node is null then the string "Supplied root node is null" is
returned. If a root node is already defined from previous calls to this
class, it is ignored when this method is callled.
- Returns:
- A formatted string representing the scene graph.
All Packages Class Hierarchy This Package Previous Next Index