Example #1
0
 /**
  * Copies all node information from <code>originalNodeComponent</code> into the current node. This
  * method is called from the <code>cloneNodeComponent</code> method which is, in turn, called by
  * the <code>cloneNode</code> method. <br>
  * NOTE: Applications should <i>not</i> call this method directly. It should only be called by the
  * cloneNode method.
  *
  * @param originalNodeComponent the node to duplicate.
  * @param forceDuplicate when set to <code>true</code>, causes the <code>duplicateOnCloneTree
  *     </code> flag to be ignored. When <code>false</code>, the value of each node's <code>
  *     duplicateOnCloneTree</code> variable determines whether NodeComponent data is duplicated or
  *     copied.
  * @exception RestrictedAccessException if forceDuplicate is set and this object is part of a
  *     compiled scenegraph
  * @see NodeComponent#cloneNodeComponent
  * @see Node#cloneNode
  * @see Node#cloneTree
  * @since Java 3D 1.2
  */
 public void duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate) {
   originalNodeComponent.forceDuplicate = forceDuplicate;
   try {
     duplicateNodeComponent(originalNodeComponent);
   } catch (RuntimeException e) {
     originalNodeComponent.forceDuplicate = false;
     throw e;
   }
   originalNodeComponent.forceDuplicate = false;
 }