Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
William Koscho is currently offline William Koscho
Messages: 10
Registered: May 2010
Junior Member
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
Johan Schulz is currently offline Johan Schulz
Messages: 20
Registered: November 2010
Junior Member
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: Thu Apr 17 11:45:23 EDT 2014

Powered by FUDForum. Page generated in 0.03644 seconds