de.cau.cs.kieler.klay.layered.p5edges
Class SimpleLabelPlacer

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klay.layered.p5edges.SimpleLabelPlacer
All Implemented Interfaces:
IAlgorithm, ILabelPlacer

public class SimpleLabelPlacer
extends AbstractAlgorithm
implements ILabelPlacer

A simple label placement implementation. Places the labels in the middle between two ports.

Rating red

Constructor Summary
SimpleLabelPlacer()
           
 
Method Summary
 LLabel longestLabel(Layer thelayer)
          Gives the size of the longest label in the given layer.
 void placeLabels(LayeredGraph thelayeredGraph)
          Calculates label positions for given graph and stores them in it.
 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

SimpleLabelPlacer

public SimpleLabelPlacer()
Method Detail

placeLabels

public void placeLabels(LayeredGraph thelayeredGraph)
Calculates label positions for given graph and stores them in it.

Specified by:
placeLabels in interface ILabelPlacer
Parameters:
thelayeredGraph - The respective graph

longestLabel

public LLabel longestLabel(Layer thelayer)
Gives the size of the longest label in the given layer. You should only consider those of source ports.

Specified by:
longestLabel in interface ILabelPlacer
Parameters:
thelayer - The layer to check
Returns:
The longest LLabel

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