de.cau.cs.kieler.klay.layered.p5edges
Class SimpleLabelPlacer
java.lang.Object
de.cau.cs.kieler.core.alg.AbstractAlgorithm
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

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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleLabelPlacer
public SimpleLabelPlacer()
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