Skip to main content



      Home
Home » Eclipse Projects » GEF » [Zest] All the nodes are in the upper left corner - please help
[Zest] All the nodes are in the upper left corner - please help [message #638846] Fri, 12 November 2010 13:23 Go to next message
Eclipse UserFriend
I am using a Zest GraphViewer, with a ContentProvider and LabelProvider and set my layout to RadialLayout. Everything displays fine the first time.

However, when I update the underlying model the ContentProvider gets notified and then calls refresh on the GraphView.

When it re-displays, all the nodes are in the upper left corner, on top of each other.

Any ideas why this is happening?

Thanks in advance,
Bill
Re: [Zest] All the nodes are in the upper left corner - please help [message #642315 is a reply to message #638846] Tue, 30 November 2010 13:52 Go to previous message
Eclipse UserFriend
You have to call applyLayout() on your GraphViewer reference. I use this helper method to refresh my UI after a model change occured.

private void updateGraph()  {
    this.viewer.refresh();
    this.viewer.applyLayout();
}


All new nodes move (nicely animated) from the upper left corner to their final position.



Johan
Previous Topic:activating antialiasing for the SCALED_FEEDBACK_LAYER
Next Topic:[Zest] How to add Listener For GraphNode/GraphConnection?
Goto Forum:
  


Current Time: Sat Apr 26 08:45:38 EDT 2025

Powered by FUDForum. Page generated in 0.02652 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top