Create decision tree, all collapsed but the root and its children

Hi, I am relatively new to this. below is adaped from your decision tree example. I am trying to get it to be drawn
with the top node and its 2 children visible and all else collapsed. nothing seems to work. It opens all collapsed- only root visible. can someone tell me
where to do that. I tried calling expandTree() and changing nodes to visible but it didnt’ have any effect. thanks!



 

You can find all of the root nodes by calling Diagram.findRootNodes() and then call Node.collapseTree(2) on each root node.