Class LayoutGrid<D>

java.lang.Object
eu.bandm.tools.graficUtils.LayoutGrid<D>
Direct Known Subclasses:
LayoutLeftmost

public abstract class LayoutGrid<D> extends Object
Base class for layout algorithms which try to place visual representations of graph nodes automatically into a grid of rows and columns.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<D,Integer>
     
    protected GraphModel<D>
     
    protected Map<D,Integer>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Create a layout object for the graph model, not yet performing the layout calculation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Print rows and columns, for debugging.
    int
    getCol(D obj)
    get the column of the graph node, after successul layout calculation.
    int
    getRow(D obj)
    get the row of the graph node, after successul layout calculation.
    abstract void
    layout(D obj)
    Perfom the layout calculation process.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LayoutGrid

      protected LayoutGrid(GraphModel<D> m)
      Create a layout object for the graph model, not yet performing the layout calculation.
  • Method Details

    • getRow

      public int getRow(D obj)
      get the row of the graph node, after successul layout calculation.
    • getCol

      public int getCol(D obj)
      get the column of the graph node, after successul layout calculation.
    • layout

      public abstract void layout(D obj)
      Perfom the layout calculation process.
    • dump

      public void dump(PrintStream p)
      Print rows and columns, for debugging.