Пример #1
0
  /**
   * Copies all node information from <code>originalNodeComponent</code> into the current node. This
   * method is called from the <code>duplicateNode</code> method. This routine does the actual
   * duplication of all "local data" (any data defined in this object).
   *
   * @param originalNodeComponent the original 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.
   * @see Node#cloneTree
   * @see NodeComponent#setDuplicateOnCloneTree
   */
  void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate) {
    super.duplicateAttributes(originalNodeComponent, forceDuplicate);

    TransparencyAttributesRetained attr =
        (TransparencyAttributesRetained) originalNodeComponent.retained;
    TransparencyAttributesRetained rt = (TransparencyAttributesRetained) retained;

    rt.initTransparencyMode(attr.getTransparencyMode());
    rt.initTransparency(attr.getTransparency());
    rt.initSrcBlendFunction(attr.getSrcBlendFunction());
    rt.initDstBlendFunction(attr.getDstBlendFunction());
  }