GraphStream Users

Archives de la liste Aide


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


Chronologique Discussions 
  • From: Tino Schöllhorn <schoellhorn AT ifm.uni-mannheim.de>
  • To: guilhelm savin <guilhelm.savin AT gmail.com>, "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>
  • Subject: Re: Computing the positions of a Layout without Viewer.display
  • Date: Mon, 8 Feb 2016 08:51:25 +0100

Hi Guihelm,

that's it. Thanks!

Tino

Am 07.02.2016 um 15:19 schrieb guilhelm savin:
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


-- 
Tino Schöllhorn
Diplom-Wirtschaftsinformatiker

ifm
Institut für Mittelstandsforschung
Lehrstuhl für Mittelstandsforschung und Entrepreneurship
L 9, 1-2
68161 Mannheim

Tel: +49-621-181-3532
Fax: +49-621-181-2892
e-mail: schoellhorn AT ifm.uni-mannheim.de
internet: http://www.ifm.uni-mannheim.de 



Archives gérées par MHonArc 2.6.16.

Top of page