Class dnx.lr.NodeTreeContext
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.NodeTreeContext

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.util.DNXInstancedObject
                   |
                   +----dnx.lr.NodeTreeContext

public class NodeTreeContext
extends DNXInstancedObject
A NodeTreeContext encapsulates a subdivision of a scene. Routes can flow within a NodeTreeContext but not between different NodeTreeContexts, even within the same scene. Each NodeTreeContext points to the scene (or more specifically, the SceneContext) that it is a part of. There are three NodeTreeContext subclasses: -- SceneContext is used for all nodes that are "normally" part of a scene. This includes all the nodes that are specified in the .wrl file. There is only one SceneContext per scene. -- EmbeddedNodeTreeContext is used for "embedded nodes" that are contained underneath what appears to be a LeafNode. This includes the nodes underneath inlines and prototypes. Note that every different inline node and prototype instantiation within a scene has its own EmbeddedNodeTreeContext (however, if a particular such node has multiple instances, all instances will share the same EmbeddedNodeTreeContext). -- AuxNodeTreeContext is used for "auxiliary nodes" that are to be rendered along with the scene but are not otherwise considered a part of the scene. This includes such things as selection boxes attached to particular node instances to represent a selected node. Note that an AuxNodeTreeContext is attached to a particular node instance (not to a Node object) and there can be any number of AuxNodeTreeContext objects attached to a node instance.

Variable Index

 o plist

Constructor Index

 o NodeTreeContext()

Method Index

 o enumerateNodesByName(String)
Return an enumeration of all nodes in the NodeTreeContext with the given name.
 o firstNodeWithName(String)
Return a node in the NodeTreeContext with the given name, if such a node exists.
 o getProperty(Object)
Get the value of a property.
 o getProperty(Object, Object)
Get the value of a property.
 o getPropertyEqual(Object)
Like getProperty() but compare keys with equals().
 o getPropertyEqual(Object, Object)
Like getProperty() but compare keys with equals().
 o getSceneContext()
Return the SceneContext of the scene this context is attached to.
 o putProperty(Object, Object)
Add an arbitrary property to a node instance.
 o putPropertyEqual(Object, Object)
Like putProperty() but compare keys with equals().
 o removeProperty(Object)
Remove a property from a node instance.
 o removePropertyEqual(Object)
Like removeProperty() but compare keys with equals().

Variables

 o plist
  protected PropertyList plist

Constructors

 o NodeTreeContext
  public NodeTreeContext()

Methods

 o getSceneContext
  public abstract SceneContext getSceneContext()
Return the SceneContext of the scene this context is attached to. Note that SceneContext is a subclass of NodeTreeContext, and this method on that class returns the object itself.
 o putProperty
  public void putProperty(Object key,
                          Object value)
Add an arbitrary property to a node instance. This mechanism allows you to attach instance-specific data to an instance. Keys are compared using the `==' operator. Therefore, don't use strings as keys; instead, use the Symbol object, by calling Symbol.intern ("string") to convert a string into a Symbol. If the key already exists, its value is replaced. @see dnx.util.Symbol @see dnx.util.PropertyList
 o getProperty
  public Object getProperty(Object key)
Get the value of a property. Keys are compared using the `==' operator; this means that the keys should not be strings (use Symbols instead). If the key is not found, null is returned. @see dnx.util.Symbol @see dnx.util.PropertyList
 o getProperty
  public Object getProperty(Object key,
                            Object defalt)
Get the value of a property. Keys are compared using the `==' operator; this means that the keys should not be strings (use Symbols instead). If the key is not found, DEFALT is returned. @see dnx.util.Symbol @see dnx.util.PropertyList
 o removeProperty
  public boolean removeProperty(Object key)
Remove a property from a node instance. Keys are compared using the `==' operator; this means that the keys should not be strings (use Symbols instead). Return value is true if the key was found. @see dnx.util.Symbol @see dnx.util.PropertyList
 o putPropertyEqual
  public void putPropertyEqual(Object key,
                               Object value)
Like putProperty() but compare keys with equals().
 o getPropertyEqual
  public Object getPropertyEqual(Object key)
Like getProperty() but compare keys with equals().
 o getPropertyEqual
  public Object getPropertyEqual(Object key,
                                 Object defalt)
Like getProperty() but compare keys with equals().
 o removePropertyEqual
  public boolean removePropertyEqual(Object key)
Like removeProperty() but compare keys with equals().
 o firstNodeWithName
  public Node firstNodeWithName(String name)
Return a node in the NodeTreeContext with the given name, if such a node exists. Note that there may be more than one node with the same name; use enumerateNodesByName() if you want all of them.
 o enumerateNodesByName
  public Enumeration enumerateNodesByName(String name)
Return an enumeration of all nodes in the NodeTreeContext with the given name.

All Packages  Class Hierarchy  This Package  Previous  Next  Index