de.cau.cs.kieler.klay.layered.intermediate
Class CompoundSideProcessor

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klay.layered.intermediate.CompoundSideProcessor
All Implemented Interfaces:
IAlgorithm, ILayoutProcessor

public class CompoundSideProcessor
extends AbstractAlgorithm
implements ILayoutProcessor

Sets up dummy nodes at the sides of a compound node, connects these nodes with dummy edges. The linear segments node placer will place the dummy nodes in a line, such allowing for the compound node borders to be drawn. This approach is inspired by Georg Sander, "Layout of Compound Directed Graphs", Technical Report A/03/96, Universität des Saarlandes, 1996

Precondition:
a layered graph with fixed node ordering.
Postcondition:
two dummy nodes of type are inserted for each compound node for each layer it spans, one above all nodes belonging to that subgraph, one below..
Slots:
After phase 3.
Same-slot dependencies:
None.

Rating red

Constructor Summary
CompoundSideProcessor()
           
 
Method Summary
static Layer findSpanEnd(LNode upperBorder, List<Layer> layers)
          Finds the layer, in which the closing Compound Dummy Nodes for upperBorder are placed.
 void process(LayeredGraph layeredGraph)
          Performs the phase's work on the given graph.
 
Methods inherited from class de.cau.cs.kieler.core.alg.AbstractAlgorithm
getMonitor, reset, reset, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cau.cs.kieler.core.alg.IAlgorithm
reset, reset, setProgressMonitor
 

Constructor Detail

CompoundSideProcessor

public CompoundSideProcessor()
Method Detail

process

public void process(LayeredGraph layeredGraph)
Performs the phase's work on the given graph.

Specified by:
process in interface ILayoutProcessor
Parameters:
layeredGraph - a layered graph

findSpanEnd

public static Layer findSpanEnd(LNode upperBorder,
                                List<Layer> layers)
Finds the layer, in which the closing Compound Dummy Nodes for upperBorder are placed. Make sure the LNode you pass as a parameter is of the type UPPER_COMPOUND_BORDER.

Parameters:
upperBorder - upper compound border dummy node for which the partner lower compound border dummy node is to be found.
layers - list of all layers.
Returns:
returns layer, in which the closing compound dummy nodes for the given border node are placed.