GraphStream Users

Archives de la liste Aide

Re: Run SpringBox Layout again

Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT>
  • To: graphstream-users AT, Filippo Bistaffa <filippo.bistaffa AT>
  • Subject: Re: Run SpringBox Layout again
  • Date: Wed, 21 Dec 2011 16:46:50 +0100

Hi again,

I make some tests and it appears that layout restart when
new elements are added.

Which version of GraphStream are you using ?


2011/12/21 guilhelm savin <guilhelm.savin AT>
Hi Filippo,

I think the fact that layout does not restart when adding new elements
is a bug. We will look at this as swiftly as possible.

However, you have temporary solutions :

1. set the stabilization limit to 0

| Graph g = ...;
| SpringBox box = new SpringBox(false);
| Viewer v = g.display(false);
| v.enableAutoLayout(box);
| box.setStabilizationLimit(0);

Another solution could be to call the "shake()" method of
SpringBox when you need to compute new coordinates but this
should lead to a concurrent exception since the layout is
running in its own thread.

Hope this helps ...


2011/12/21 Filippo Bistaffa <filippo.bistaffa AT>
How can I force the SpringBox Layout run again on a graph? I need to do this after I add/remove some nodes/edges, and the visualization is already running.

So far I've tried this:
new LayoutRunner(g, new SpringBox(), true); 
(g is the graph), but it's not working

Guilhelm Savin
PhD Student of Computer Science

Guilhelm Savin
PhD Student of Computer Science

Archives gérées par MHonArc 2.6.16.

Top of page