code: protected void setTreeGraph(TreeGraph tg) {
      this.tg = tg;
      for (TreeGraphNode child : children) {
        child.setTreeGraph(tg);
      }
    }
docs: Set pointer to the <code>TreeGraph</code> of which this node
  is a part.  Operates recursively to set pointer for all
  descendants too.