de.cau.cs.kieler.klay.layered.intermediate
Class NodeMarginCalculator

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

public class NodeMarginCalculator
extends AbstractAlgorithm
implements ILayoutProcessor

Sets the node margins. Node margins are influenced by both port positions and sizes and label positions and sizes. Furthermore, comment boxes that are put directly above or below a node also increase the margin.

Precondition:
a layered graph; nodes have fixed port positions; labels have fixed positions.
Postcondition:
the node margins are properly set to form a bounding box around the node and its ports and labels.
Slots:
Before phase 4.
Same-slot dependencies:
PortPositionProcessor

See Also:
PortPositionProcessor
Rating red

Constructor Summary
NodeMarginCalculator()
           
 
Method Summary
 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

NodeMarginCalculator

public NodeMarginCalculator()
Method Detail

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