Class LayoutLeftmost<D>

java.lang.Object
eu.bandm.tools.graficUtils.LayoutGrid<D>
eu.bandm.tools.graficUtils.LayoutLeftmost<D>

public class LayoutLeftmost<D> extends LayoutGrid<D>
A grid layouter which tries a most compact arrangements of nodes, ruled by generations.

It needs one certain root object. It lays all neighbours from top down, and all siblings form left to right. E.g.
1->2  2->3 2->4 1->5 5->6 will give

      1

      2        5

      3    4   6
  • Field Details

    • currow

      protected int currow
    • curcol

      protected int curcol
    • visited

      protected Set<D> visited
  • Constructor Details

    • LayoutLeftmost

      public LayoutLeftmost(GraphModel<D> m)
  • Method Details

    • layout

      public void layout(D obj)
      Perform the layout process with given graph root.
      Specified by:
      layout in class LayoutGrid<D>
      Parameters:
      obj - the root from which to start the layouting
    • calc

      protected void calc(D obj)