de.cau.cs.kieler.klay.layered
Class KGraphImporter

java.lang.Object
  extended by de.cau.cs.kieler.klay.layered.AbstractGraphImporter<KNode>
      extended by de.cau.cs.kieler.klay.layered.KGraphImporter
All Implemented Interfaces:
IGraphImporter<KNode>

public class KGraphImporter
extends AbstractGraphImporter<KNode>

Manages the transformation of KGraphs to LayeredGraphs. Sets the Properties.GRAPH_PROPERTIES property on imported graphs.

Rating red

Constructor Summary
KGraphImporter()
           
 
Method Summary
 void applyLayout(LayeredGraph layeredGraph)
          Apply the computed layout of the given layered graph to the original input graph.
 LayeredGraph importGraph(KNode graph)
          Create a layered graph from the given graph.
 
Methods inherited from class de.cau.cs.kieler.klay.layered.AbstractGraphImporter
createExternalPortDummy, getExternalPortPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KGraphImporter

public KGraphImporter()
Method Detail

importGraph

public LayeredGraph importGraph(KNode graph)
Create a layered graph from the given graph.

Parameters:
graph - the graph to turn into a layered graph.
Returns:
a layered graph, or null if the input was not recognized

applyLayout

public void applyLayout(LayeredGraph layeredGraph)
Apply the computed layout of the given layered graph to the original input graph.
Precondition:
the graph has all its dummy nodes and edges removed; edges that were reversed during layout have been restored to their original orientation
Postcondition:
none

Parameters:
layeredGraph - a graph for which layout is applied