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

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

public class BalancingLayerAssigner
extends AbstractAlgorithm
implements ILayerAssigner

Layer assigner that balances the output of a basic layer assigner.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
BalancingLayerAssigner(ILayerAssigner thebasicLayerAssigner)
          Creates a balancing layer assigner using a basic layer assigner.
 
Method Summary
 LayeredGraph assignLayers(KSlimGraph graph, KNode parentNode, float objSpacing, boolean balanceOverSize)
          Create a layered graph and assign layers to each node.
 
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

BalancingLayerAssigner

public BalancingLayerAssigner(ILayerAssigner thebasicLayerAssigner)
Creates a balancing layer assigner using a basic layer assigner.

Parameters:
thebasicLayerAssigner - basic layer assigner
Method Detail

assignLayers

public LayeredGraph assignLayers(KSlimGraph graph,
                                 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:
graph - 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