Examples of numChildren()


Examples of com.google.template.soy.soytree.TemplateNode.numChildren()

    SoyFileSetNode soyTree = SharedTestUtils.parseSoyFiles(testFileContent);
    TemplateNode template = (TemplateNode) SharedTestUtils.getNode(soyTree);

    // Before.
    assertEquals(7, template.numChildren());

    (new RemoveHtmlCommentsVisitor()).exec(soyTree);

    // After.
    assertEquals(4, template.numChildren());
View Full Code Here

Examples of com.google.template.soy.soytree.TemplateNode.numChildren()

    assertEquals(7, template.numChildren());

    (new RemoveHtmlCommentsVisitor()).exec(soyTree);

    // After.
    assertEquals(4, template.numChildren());
    assertEquals("$boo", ((PrintNode) template.getChild(0)).getExprText());
    assertEquals("Blah blah.", ((RawTextNode) template.getChild(1)).getRawText());
    assertEquals("$boo", ((PrintNode) template.getChild(2)).getExprText());
    assertEquals("$boo", ((PrintNode) template.getChild(3)).getExprText());
  }
View Full Code Here

Examples of com.jitlogic.zorka.common.tracedata.TraceRecord.numChildren()

            assertThat(s.getId()).isEqualTo(sid(s.getName()));
            obj = reader.readObject();
        }

        TraceRecord tr2 = (TraceRecord) obj;
        assertThat(tr2.numChildren()).isEqualTo(1);
        assertThat(tr2.getChild(0).getTime()).isEqualTo(50L);
    }


    @Test
View Full Code Here

Examples of javax.media.j3d.BranchGroup.numChildren()

   * Updates the rotation of the model displayed by this component.
   * The model is shown at its default size.
   */
  protected void setModelRotation(float [][] modelRotation) {
    BranchGroup model = getModel();
    if (model != null && model.numChildren() > 0) {
      BoundingBox bounds = ModelManager.getInstance().getBounds(model);
      Point3d lower = new Point3d();
      bounds.getLower(lower);
      Point3d upper = new Point3d();
      bounds.getUpper(upper);
View Full Code Here

Examples of javax.media.j3d.BranchGroup.numChildren()

   * Updates the rotation and the size of the model displayed by this component.
   */
  protected void setModelRotationAndSize(float [][] modelRotation,
                                         float width, float depth, float height) {
    BranchGroup model = getModel();
    if (model != null && model.numChildren() > 0) {
      BoundingBox bounds = ModelManager.getInstance().getBounds(model);
      Point3d lower = new Point3d();
      bounds.getLower(lower);
      Point3d upper = new Point3d();
      bounds.getUpper(upper);
View Full Code Here

Examples of javax.media.j3d.BranchGroup.numChildren()

        // Return the first scene that can be loaded from model URL content
        Scene scene = loader.load(urlContent.getURL());

        BranchGroup modelNode = scene.getSceneGroup();
        // If model doesn't have any child, consider the file as wrong
        if (modelNode.numChildren() == 0) {
          throw new IllegalArgumentException("Empty model");
        }
       
        // Update transparency of scene window panes shapes
        updateShapeNamesAndWindowPanesTransparency(scene);
View Full Code Here

Examples of javax.media.j3d.BranchGroup.numChildren()

   * Returns the node of the outline model.
   */
  private Node getOutlineModelNode() {
    TransformGroup transformGroup = (TransformGroup)getChild(0);
    BranchGroup branchGroup = (BranchGroup)transformGroup.getChild(0);
    if (branchGroup.numChildren() > 1) {
      return branchGroup.getChild(1);
    } else {
      return null;
    }
  }
View Full Code Here

Examples of javax.media.j3d.TransformGroup.numChildren()

  /**
   * Returns the <code>model</code> displayed by this component.
   */
  public BranchGroup getModel() {
    TransformGroup modelTransformGroup = (TransformGroup)this.sceneTree.getChild(0);
    if (modelTransformGroup.numChildren() > 0) {
      return (BranchGroup)modelTransformGroup.getChild(0);
    } else {
      return null;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.