This class provides a single method to perform an auto layout on a given
graph from the GraphFlow. The JavaScript GraphFlow throws an
"autoLayout"-Event upon using the function autoLayout(). This event provides
two Strings which may be used by this class' layoutGraph(nodes, edges)
method. The return value can then be used as an argument for the GraphFlow's
loadPositions(positions) function.
Author:
Robin Weiss, Nils Christian Ehmke, Florian Fittkau
Takes two input strings and generates a Graph using the given information.
This Graph is then layouted using a KIELER algorithm. The new positions
of nodes, the bend points of edges and node dimensions are returned as a single string.
nodes - this string starts with a scaling factor for ports and is followed
by semicolon separated node information that is constructed like this:
" <"f" if node has ports, else "c">
;"
without the brackets and linebreaks, but with the space separation
edges - a semicolon separated string. Each semicolon separated part is constructed like this:
";"
without the brackets but with the space separation
Returns:
a result string, starting with "autolayout#" followed by semicolon separated node information,
that looks like this: ";",
followed by a "#" and semicolon separated edge information, that look loke this:
" ... ;"
for N bend points.