de.cau.cs.kieler.klay.layered.p4nodes
Class LinearSegmentsNodePlacer

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

public class LinearSegmentsNodePlacer
extends AbstractAlgorithm
implements ILayoutPhase

Node placement implementation that aligns long edges using linear segments. Inspired by Section 4 of

Precondition:
the graph has a proper layering with optimized nodes ordering; ports are properly arranged
Postcondition:
each node is assigned a vertical coordinate such that no two nodes overlap; the size of each layer is set according to the area occupied by contained nodes; the height of the graph is set to the maximal layer height

Rating red

Constructor Summary
LinearSegmentsNodePlacer()
           
 
Method Summary
 IntermediateProcessingStrategy getIntermediateProcessingStrategy(LayeredGraph graph)
          Returns the intermediate layout processors this phase depends on.
 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

LinearSegmentsNodePlacer

public LinearSegmentsNodePlacer()
Method Detail

getIntermediateProcessingStrategy

public IntermediateProcessingStrategy getIntermediateProcessingStrategy(LayeredGraph graph)
Returns the intermediate layout processors this phase depends on.

Specified by:
getIntermediateProcessingStrategy in interface ILayoutPhase
Parameters:
graph - the layered graph to be processed. The strategy may vary depending on certain properties of the graph.
Returns:
intermediate processing strategy. May be null.

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