/** * This function is called from getNodeComponent() to see if any of * the sub-NodeComponents duplicateOnCloneTree flag is true. * If it is the case, current NodeComponent needs to * duplicate also even though current duplicateOnCloneTree flag is false. * This should be overwrite by NodeComponent which contains sub-NodeComponent. */ @Override boolean duplicateChild() { if (getDuplicateOnCloneTree()) return true; int level = ((TextureRetained) this.retained).maxLevels; TextureRetained rt = (TextureRetained) retained; for (int i=0; i < level; i++) { ImageComponent img = rt.getImage(i); if ((img != null) && img.getDuplicateOnCloneTree()) return true; } return false; }