GraphStream Users

Archives de la liste Aide

Flickering while adding nodes

Chronologique Discussions 
  • From: Eduardo Lidanski <eduardo.lidanski AT>
  • To: graphstream-users AT
  • Subject: Flickering while adding nodes
  • Date: Wed, 13 Nov 2013 17:18:31 +0100


I have a graph where I add nodes constantly and after some few time after each graph.addNode() operation I add an edge of the node.
So I have:
Node n = graph.addNode()
//some time passes
Edge n_a = graph.addEdge()

Normally, the time between adding the node and adding its edge is less than 1 second, but in my application I cannot know that for advance, since it is possible that no edge is being added.
it works well, but each time a node is added, the whole graph flickers ... so it is very annoying.
I think that is because the node adds itself at the upper right corner of the graph, a second after that it adds its edge, and this causes the flickering.
But do you know what can I do to prevent the flickering ?
I tried to create a thread that adds the node and the edge together after 1 second if an edge has been found in that second. If not, it adds the node alone. This prevents the flickering, but is not good for my application.
What else could I do?

I noticed the node appears at the very far end up, so the graph becomes for a small second very small, and then the graph appears with its normal size again. I think the node is appearing veeery far away, that is why the graph changes its actual size for a second. How can I limit this?


Archives gérées par MHonArc 2.6.16.

Top of page