GraphStream Users

Archives de la liste Aide


Re: Computing the positions of a Layout without Viewer.display


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>, schoellhorn AT ifm.uni-mannheim.de
  • Subject: Re: Computing the positions of a Layout without Viewer.display
  • Date: Sun, 7 Feb 2016 15:19:19 +0100

Hi Tino,

I guess you are looking for the `computeLayout(...)` method of Toolkit.

Hope it helps...
Guilhelm

2016-02-07 15:03 GMT+01:00 <schoellhorn AT ifm.uni-mannheim.de>:
Hi,

I am working at a graph visualization and I'd like to compute the
xyz-coordinates of the graph via the Layout mechanism and store the positions
in the graph (and finally export them to DGS).

Currently I only was able to achive this via Graph.display like this:

<code>
                Layout layout = Layouts.newLayoutAlgorithm();
                layout.setSendNodeInfos(true);

                // Viewer
                Viewer v = graph.display(false);

                // Pipe
                ViewerPipe pipe = v.newViewerPipe();
                pipe.addAttributeSink(graph);

                v.enableAutoLayout(layout);

                Thread.sleep(5000);


                pipe.pump();
</code>

On our server we only have a headless env - so this approach will not work. How
would I have to apply "Layout" on the Graph so the xyz-Attribut is updated?

Thanks in advance!
Tino



--
Guilhelm Savin
PhD of Computer Science



Archives gérées par MHonArc 2.6.16.

Top of page