Class LevelLayout.LevelData

  • Enclosing class:
    LevelLayout

    public class LevelLayout.LevelData
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object _copyGraph
      The local graph copy of the user's graph, to which dummy nodes/edges are added, and on which the actual layout is first performed before these values are copied back into the user's graph.
      protected java.util.ArrayList[] _levels
      A simple data structure to keep track of the levels.
      protected int _maxLevel
      A variable that is used to keep track of the maximum level in the graph, starting at -1 and then incremented as the level-finding algorithm is applied.
      protected java.lang.Object _meta
      A meta-node which is a dummy node that is added to the graph with edges to every other node in the graph in order to make it easier to perform a topological sort.
      protected java.lang.Object _origGraph
      The original graph that is passed in by the user on which the layout is eventually being assigned.
      protected LayoutTarget _target
      The layout target that is passed in by the user and used to assign the layout to the view.
    • Constructor Summary

      Constructors 
      Constructor Description
      LevelData​(LayoutTarget t, java.lang.Object composite)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLevelCount()  
      int getMaxLevelWidth​(boolean withDummy)
      Each level contains a list of nodes that are in that level (level width).
      • Methods inherited from class java.lang.Object

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

      • _target

        protected LayoutTarget _target
        The layout target that is passed in by the user and used to assign the layout to the view.
      • _origGraph

        protected java.lang.Object _origGraph
        The original graph that is passed in by the user on which the layout is eventually being assigned.
      • _copyGraph

        protected java.lang.Object _copyGraph
        The local graph copy of the user's graph, to which dummy nodes/edges are added, and on which the actual layout is first performed before these values are copied back into the user's graph.
      • _maxLevel

        protected int _maxLevel
        A variable that is used to keep track of the maximum level in the graph, starting at -1 and then incremented as the level-finding algorithm is applied.
      • _levels

        protected java.util.ArrayList[] _levels
        A simple data structure to keep track of the levels. This is an array of array lists. Each array list represents a level in the graph and contains references to nodes in the graph.
      • _meta

        protected java.lang.Object _meta
        A meta-node which is a dummy node that is added to the graph with edges to every other node in the graph in order to make it easier to perform a topological sort.
    • Constructor Detail

      • LevelData

        public LevelData​(LayoutTarget t,
                         java.lang.Object composite)
    • Method Detail

      • getLevelCount

        public int getLevelCount()
      • getMaxLevelWidth

        public int getMaxLevelWidth​(boolean withDummy)
        Each level contains a list of nodes that are in that level (level width). This includes dummy nodes which are used as place holders in layout. If 'withDummy' is true, the method returns the most number of nodes including dummy nodes in a level. Otherwise, the method returns the most number of real nodes in a level.