de.cau.cs.kieler.klodd.hierarchical.impl
Class LongestPathLayerAssigner

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klodd.hierarchical.impl.LongestPathLayerAssigner
All Implemented Interfaces:
IAlgorithm, ILayerAssigner

public class LongestPathLayerAssigner
extends AbstractAlgorithm
implements ILayerAssigner

Layer assigner working with the longest path layering algorithm.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
LongestPathLayerAssigner()
           
 
Method Summary
 LayeredGraph assignLayers(KSlimGraph slimGraph, KNode parentNode, float objSpacing, boolean balanceOverSize)
          Create a layered graph and assign layers to each node.
 void reset()
          Removes the associated progress monitor.
 
Methods inherited from class de.cau.cs.kieler.core.alg.AbstractAlgorithm
getMonitor, 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, setProgressMonitor
 

Constructor Detail

LongestPathLayerAssigner

public LongestPathLayerAssigner()
Method Detail

reset

public void reset()
Removes the associated progress monitor. Any subclass that overrides this method should call super.reset().

Specified by:
reset in interface IAlgorithm
Overrides:
reset in class AbstractAlgorithm

assignLayers

public LayeredGraph assignLayers(KSlimGraph slimGraph,
                                 KNode parentNode,
                                 float objSpacing,
                                 boolean balanceOverSize)
Create a layered graph and assign layers to each node. The input ports must be put into the first layer (rank == 0), the output ports into the last layer (height == 0).

Specified by:
assignLayers in interface ILayerAssigner
Parameters:
slimGraph - graph structure that contains no directed cycles
parentNode - the parent layout node
objSpacing - the minimal distance between objects
balanceOverSize - indicates whether node balancing has priority over diagram size
Returns:
a layered graph