kieker.webgui.service.impl.utility
Class KielerInterface

java.lang.Object
  extended by kieker.webgui.service.impl.utility.KielerInterface

public final class KielerInterface
extends Object

An interface between our constrained graph representation and the KIELER graph model.

Author:
Robin Weiss, Nils Christian Ehmke, Florian Fittkau

Method Summary
static void applyLayout(Graph graph, de.cau.cs.kieler.kiml.AbstractLayoutProvider layoutProvider)
          Calls a layout procedure on the Graphs KIELER representation and updates our graph representation.
static de.cau.cs.kieler.core.kgraph.KEdge makeKielerEdge(Node source, Node target, Port sourcePort, Port targetPort)
          Constructs a directed KEdge between the KIELER representation of two nodes.
static de.cau.cs.kieler.core.kgraph.KNode makeKielerGraph()
           
static de.cau.cs.kieler.core.kgraph.KNode makeKielerNode(Graph graph, int width, int height, boolean nodeFamily)
          Constructs a KNode and adds it to the Graphs parent node.
static de.cau.cs.kieler.core.kgraph.KPort makeKielerPort(Graph graph, Node node, int x, int y)
          Constructs a KPort and adds it to a KNode representation of a Node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

applyLayout

public static void applyLayout(Graph graph,
                               de.cau.cs.kieler.kiml.AbstractLayoutProvider layoutProvider)
                        throws GraphLayoutException
Calls a layout procedure on the Graphs KIELER representation and updates our graph representation.

Parameters:
graph - the Graph that is to be layouted
layoutProvider - KIELER layout provider * @throws GraphLayoutException If something went wrong during the layouting.
Throws:
GraphLayoutException

makeKielerGraph

public static de.cau.cs.kieler.core.kgraph.KNode makeKielerGraph()
Returns:
a KNode that acts as a parent for all added nodes

makeKielerNode

public static de.cau.cs.kieler.core.kgraph.KNode makeKielerNode(Graph graph,
                                                                int width,
                                                                int height,
                                                                boolean nodeFamily)
Constructs a KNode and adds it to the Graphs parent node.

Parameters:
graph - the Graph that contains the node
width - the width of the node
height - the height of the node
nodeFamily - if true, KPorts can be added to the node
Returns:
the resulting KNode

makeKielerPort

public static de.cau.cs.kieler.core.kgraph.KPort makeKielerPort(Graph graph,
                                                                Node node,
                                                                int x,
                                                                int y)
Constructs a KPort and adds it to a KNode representation of a Node.

Parameters:
graph - the Graph that contains the port
node - the Node to which the port is added
x - the x-coordinate of the port, relative to the left border of the node
y - the y-coordinate of the port, relative to the top border of the node
Returns:
the generated KPort

makeKielerEdge

public static de.cau.cs.kieler.core.kgraph.KEdge makeKielerEdge(Node source,
                                                                Node target,
                                                                Port sourcePort,
                                                                Port targetPort)
Constructs a directed KEdge between the KIELER representation of two nodes.

Parameters:
source - the source Node of the edge
target - the target Node of the edge
sourcePort - the Port of the source Node
targetPort - the Port of the target Node
Returns:
the generated KEdge


Copyright © 2015. All rights reserved.