I’m using the TreeLayout and in my diagram, some nodes does not have any parent.
Currently, these nodes are at the first level, but I’d like to put them at the last level (like the LayeredDigraphLayout diagram).
Is it possible to have this behavior with the TreeLayout?
That would not be easy to do in a general fashion. It is possible to assign nodes to be in certain layers, but you need to know ahead of time which layer you’d want to use for each node.
Are you only concerned about singleton nodes? If so, there might be a special case solution for you.
Hmmm, I suppose you could layout each tree separately and then move them next to each other so that their last layers are all aligned. Would that be acceptable?
Ok,
I try to optimize space for our larger diagrams.
Can we know the number of layers in the diagram to put these nodes under the last layer (create a new layer for them)
Or can we put them over the first layer?
After reflection, I believe that just down the nodes without parent will be insufficient and inefficient
You will want to set ArrangingLayout.primaryLayout to be an instance of TreeLayout. By default singleton nodes will automatically be arranged by a GridLayout along the bottom of the document.