GraphStream Users

Archives de la liste Aide


Computing the positions of a Layout without Viewer.display


Chronologique Discussions 
  • From: <schoellhorn AT ifm.uni-mannheim.de>
  • To: graphstream-users AT litislab.fr
  • Subject: Computing the positions of a Layout without Viewer.display
  • Date: Sun, 7 Feb 2016 15:03:33 +0100 (CET)

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



Archives gérées par MHonArc 2.6.16.

Top of page