Menu

Updating visualization after deleting E,V

Yuruani
2012-09-28
2013-05-29
  • Yuruani

    Yuruani - 2012-09-28

    Hi. I am creating a network with Jung using FRLayout and a DirectedSparseGraph.
    The network first appears fine. Then I want to draw another network on
    pressing a button.
    The action is done like this:
    Edges and vertices from the graph are removed from the graph, new vertices and edges
    are created and added to it,
    the container gets revalidated and the main content pane gets updated.

    Once that happens, a new network appears, but this time there is
    really no layout, everything
    is spread randomly.

    What am I doing wrong? Thanks

     
  • Joshua O'Madadhain

    You're not really giving enough detail about what you're doing to be sure.

    Are you retaining the same Graph object?
    Are you updating the layout?

    Generally, I recommend looking at the AddNodeDemo for tips on how to update the visualization as you're updating the graph.

    Joshua

     

Log in to post a comment.