javax.media.j3d
Class NodeComponent

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.NodeComponent
Direct Known Subclasses:
Alpha, Appearance, AuralAttributes, ColoringAttributes, DepthComponent, Font3D, Geometry, ImageComponent, LineAttributes, Material, MediaContainer, PointAttributes, PolygonAttributes, RenderingAttributes, TexCoordGeneration, Texture, TextureAttributes, TextureUnitState, TransparencyAttributes

public abstract class NodeComponent
extends SceneGraphObject

NodeComponent is a common superclass for all scene graph node component objects such as: Geometry, Appearance, Material, Texture, etc.


Constructor Summary
NodeComponent()
          Constructs a NodeComponent object with default parameters.
 
Method Summary
 NodeComponent cloneNodeComponent()
          Deprecated. As of Java 3D version 1.2, replaced by cloneNodeComponent(boolean forceDuplicate)
 NodeComponent cloneNodeComponent(boolean forceDuplicate)
          Used to create a new instance of a NodeComponent object.
 void duplicateNodeComponent(NodeComponent originalNodeComponent)
          Deprecated. As of Java 3D version 1.2, replaced by duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)
 void duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)
          Copies all node information from originalNodeComponent into the current node.
 boolean getDuplicateOnCloneTree()
          Returns this node's duplicateOnCloneTree value.
 void setDuplicateOnCloneTree(boolean duplicate)
          Sets this node's duplicateOnCloneTree value.
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeComponent

public NodeComponent()
Constructs a NodeComponent object with default parameters. The default values are as follows:

Method Detail

setDuplicateOnCloneTree

public void setDuplicateOnCloneTree(boolean duplicate)
Sets this node's duplicateOnCloneTree value. The duplicateOnCloneTree value is used to determine if NodeComponent objects are to be duplicated or referenced during a cloneTree operation. A value of true means that this NodeComponent object should be duplicated, while a value of false indicates that this NodeComponent object's reference will be copied into the newly cloned object. This value can be overriden via the forceDuplicate parameter of the cloneTree method.

Parameters:
duplicate - the value to set.
See Also:
Node.cloneTree()

getDuplicateOnCloneTree

public boolean getDuplicateOnCloneTree()
Returns this node's duplicateOnCloneTree value. The duplicateOnCloneTree value is used to determine if NodeComponent objects are to be duplicated or referenced during a cloneTree operation. A value of true means that this NodeComponent object should be duplicated, while a value of false indicates that this NodeComponent object's reference will be copied into the newly cloned object. This value can be overriden via the forceDuplicate parameter of the cloneTree method.

Returns:
the value of this node's duplicateOnCloneTree
See Also:
Node.cloneTree()

cloneNodeComponent

public NodeComponent cloneNodeComponent()
Deprecated. As of Java 3D version 1.2, replaced by cloneNodeComponent(boolean forceDuplicate)


duplicateNodeComponent

public void duplicateNodeComponent(NodeComponent originalNodeComponent)
Deprecated. As of Java 3D version 1.2, replaced by duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)

NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.


duplicateNodeComponent

public void duplicateNodeComponent(NodeComponent originalNodeComponent,
                                   boolean forceDuplicate)
Copies all node information from originalNodeComponent into the current node. This method is called from the cloneNodeComponent method which is, in turn, called by the cloneNode method.
NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.

Parameters:
originalNodeComponent - the node to duplicate.
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
Throws:
RestrictedAccessException - if forceDuplicate is set and this object is part of a compiled scenegraph
Since:
Java 3D 1.2
See Also:
cloneNodeComponent(), Node.cloneNode(boolean), Node.cloneTree()

cloneNodeComponent

public NodeComponent cloneNodeComponent(boolean forceDuplicate)
Used to create a new instance of a NodeComponent object. This routine is called by cloneNode to duplicate the current node.
cloneNodeComponent should be overridden by any user subclassed NodeComponent objects. All subclasses must have their cloneNodeComponent method consist of the following lines:

     public NodeComponent cloneNodeComponent(boolean forceDuplicate) {
         UserNodeComponent unc = new UserNodeComponent();
         unc.duplicateNodeComponent(this, forceDuplicate);
         return unc;
     }
 

Parameters:
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
Throws:
RestrictedAccessException - if forceDuplicate is set and this object is part of a compiled scenegraph
Since:
Java 3D 1.2
See Also:
duplicateNodeComponent(javax.media.j3d.NodeComponent), Node.cloneNode(boolean), Node.cloneTree()