Best regards.Hi,Just disable the autolayout and then enable it with your layout algorithm:
/* ================================== */
Graph graph = new MultiGraph("graph");
Viewer viewer = graph.display(false);0.0);
SpringBox layout = new SpringBox();
layout.setStabilizationLimit(
viewer.enableAutoLayout(layout);
Generator gen = new RandomGenerator(6);
gen.addSink(graph);
gen.begin();
for (int i = 0; i < 100; i++) {
gen.nextEvents();
}
gen.end();
/* ================================== */2013/9/24 Jacob M. H. Smith <jacob.m.h.smith AT gmail.com>
Hi.
I have tried that, but it does not seem to work. Maybe I am still doing something wrong.
Are there some layout algorithms that don't support this setting?
Here's my code (the graph always freezes after a few seconds):
/* ================================== */
Graph graph = new MultiGraph("graph");
Viewer viewer = graph.display();
SpringBox layout = new SpringBox();
layout.setStabilizationLimit(0.0);
viewer.enableAutoLayout(layout);
Generator gen = new RandomGenerator(6);
gen.addSink(graph);
gen.begin();
for (int i = 0; i < 100; i++) {
gen.nextEvents();
}
gen.end();
/* ================================== */
Best regards,
Jacob
On Sep 22, 2013, at 5:42 PM, Guilhelm Savin <guilhelm.savin AT gmail.com> wrote:
> Hi,
>
> You just have to set the stabilization limit to 0.0
> layout.setStabilizationLimit(0.0);
>
> Regards.
> Guilhelm
>
> "Jacob M. H. Smith" <jacob.m.h.smith AT gmail.com> a écrit :
>
>> Hi.
>>
>> When I enable automatic layout in a viewer, the layout algorithm always stops when the nodes have sufficiently stabilized. Can I configure the viewer or layout so that it never stops and the layout algorithm runs continuously?
>>
>> Best regard,
>> Jacob
>>
--
Guilhelm Savin
PhD Student of Computer ScienceLITIS, University of Le Havre
\/\/\/\/\/\/
Archives gérées par MHonArc 2.6.16.