Hello Together,
JGoLayout doesn’t have a built-in table layout algorithm. It looks like you may be using the JGoLayeredDiagraphAutoLayout algorithm. In the case of multiple cables, each of which having nodes with at most one parent and one child, the resulting layout will look like what you have shown.
However, when you introduce additional links between the different cables, LayeredDigraph will attempt to put all the children of a given node in lower layers of the diagram, resulting in diagonal links as you describe.
One possibility is to layout the diagram, but not include the links between cables in the layout. That way these links between cables won’t have any influence on the resulting layout. You can do this by creating a JGoNetwork of nodes and links not containing the links between cables and pass that network to the layout algorithm.
However, there will be no guarantee that related worksteps will be located adjacent to each other, which may still result in a less than ideal diagram.
Perhaps the best approach may be to create your own table layout rather than trying to adapt an existing layout algorithm that is better suited to tree structures. A table layout should be relatively easy to accomplish by assigning a row and column position to each node and then positioning them accordingly. Then you will have complete control over the position of each node, both horizontally and vertically.