Adds the getBounds method on the tree.