|
Re: Asynchronous layouting of zest graph [message #1690269 is a reply to message #1690099] |
Thu, 26 March 2015 09:18 |
|
Hi Stephan,
unfortunately, the Zest 1.x layout model is combined with the visuals, therefore, changes made by a layout algorithm will directly affect the visuals. Laying out the nodes in the background will only be possible by subclassing and overriding the following (I am unsure if this is sufficient, though):
- GraphNode#getLayoutEntity() has to return a LayoutEntity that is able to delay updating the visuals.
- GraphConnection#getLayoutRelatioship() has to return a LayoutRelationship that is able to delay updating the visuals.
- Graph#applyLayout() has to run the layout pass in the background and update all visuals afterwards.
For an alternative, you could take a look at GEF4 Zest [1] where layout model and visuals are separated. However, you would have to subclass/override LayoutContextBehavior#applyStaticLayout() there as well to run the layout pass in the background.
Best regards,
Matthias
[1] git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.fx
|
|
|
Powered by
FUDForum. Page generated in 0.01311 seconds