Same level constraints (HL)

If you want to force several nodes to the same level with fixed index, you can set the level index parameter of these nodes accordingly (see Level index parameter (HL)) or use a level range constraint (see Level range constraints (HL)). However, if you want to force several nodes to the same level without forcing them to a specific level index, you cannot use these mechanisms. You must use a same level constraint.
To set the same level constraint:
Call:
layout.addConstraint(new ibm_ilog.graphlayout.hierarchical.HierarchicalSameLevelConstraint(node1, node2)); 
This forces node1 and node2 to be placed in the same level, but it does not constrain them to any particular level.
The following figure illustrates the placement of nodes at the same level.
Diagram
of Hierarchical Layout showing all nodes fixed at the same level
All nodes fixed at same level