|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.klay.layered.AbstractGraphImporter<KNode>
de.cau.cs.kieler.klay.layered.KGraphImporter
public class KGraphImporter
Manages the transformation of KGraphs to LayeredGraphs. Sets the
Properties.GRAPH_PROPERTIES
property on imported graphs.
Constructor Summary | |
---|---|
KGraphImporter()
|
Method Summary | |
---|---|
void |
applyLayout(LayeredGraph layeredGraph)
Apply the computed layout of the given layered graph to the original input graph. |
protected void |
clip(KVector endpoint,
KVector portSize,
KVector next)
KLay Layered aligns ports at their center. |
LayeredGraph |
importGraph(KNode kgraph)
Create a layered graph from the given graph. |
protected void |
transformEdge(KEdge kedge,
KNode graph,
Map<KGraphElement,LGraphElement> elemMap,
MapPropertyHolder layeredGraph)
Transforms the given edge. |
protected void |
transformNode(KNode node,
List<LNode> layeredNodes,
Map<KGraphElement,LGraphElement> elemMap,
Set<GraphProperties> graphProperties,
Direction direction)
Transforms the given node. |
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 |
---|
public KGraphImporter()
Method Detail |
---|
public LayeredGraph importGraph(KNode kgraph)
kgraph
- the graph to turn into a layered graph.
null
if the input was not recognizedprotected void transformNode(KNode node, List<LNode> layeredNodes, Map<KGraphElement,LGraphElement> elemMap, Set<GraphProperties> graphProperties, Direction direction)
node
- the node to transform.layeredNodes
- the list of nodes to add the transformed node to.elemMap
- the element map that maps the original KGraph
elements to the transformed
LGraph
elements.graphProperties
- graph properties updated during the transformation.direction
- the overall layout directionprotected void transformEdge(KEdge kedge, KNode graph, Map<KGraphElement,LGraphElement> elemMap, MapPropertyHolder layeredGraph)
kedge
- the edge to transform.graph
- the original graph.elemMap
- the element map that maps the original KGraph
elements to the transformed
LGraph
elements.layeredGraph
- the layeredGraph.public void applyLayout(LayeredGraph layeredGraph)
layeredGraph
- a graph for which layout is appliedprotected void clip(KVector endpoint, KVector portSize, KVector next)
endpoint
- an endpoint of an edgeportSize
- the size of the corresponding portnext
- the next point on the edge's path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |