Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kieker.webgui.service.impl
Class KielerGraphLayoutServiceImpl

    java.lang.Object
      kieker.webgui.service.impl.KielerGraphLayoutServiceImpl

All Implemented Interfaces:
  IGraphLayoutService

    @Service
    public final class KielerGraphLayoutServiceImpl

extends Object
implements IGraphLayoutService

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

Constructor Summary
`KielerGraphLayoutServiceImpl()` Default constructor.

Method Summary
`String` | `layoutGraph(String nodes, String edges)` Takes two input strings and generates a `Graph` using the given information.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KielerGraphLayoutServiceImpl

    public KielerGraphLayoutServiceImpl()

  Default constructor.

Method Detail

### layoutGraph

    public String layoutGraph(String nodes,
                              String edges)
                       throws GraphLayoutException

  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.

  Specified by:
    `layoutGraph` in interface `IGraphLayoutService`
  Parameters:
    `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.
  Throws:
    `GraphLayoutException` - If something went wrong during the layouting.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All rights reserved.