[Zest] [message #1746504] |
Mon, 31 October 2016 06:46  |
Eclipse User |
|
|
|
Hello.
First of all I am currently trying to implement an own layout algorithm using Zest for visualization purposes.
So far the algorithm works as intended but the transition to Zest is not working as desired. I think (not quite sure) that the main issue lies in the different handling of the polar point. Therefore I have 2 questions.
1) Where is the polar point located in Zest for its components (mainly nodes)
2) Is it possible to move the polar point for a custom ContentProvider?
• otherwise I have to move the polar point (currently top, left) handled by every layout algorithm.
|
|
|
|
|
Re: [Zest] [message #1746708 is a reply to message #1746646] |
Thu, 03 November 2016 11:06   |
Eclipse User |
|
|
|
Hi Christoph,
it should be possible to circumvent the issue when providing/adapting layout properties, i.e. when reading the node's location to pass it to the layout algorithm and when writing the node's location that was computed by the layout algorithm, which is done within NodeLayoutBehavior. So you could try to override this behavior and provide logic that is suitable for your CustomNodePart. If you need assistance with this, it would be best if you could provide a small application that demonstrates the problems. Alternatively, you could log the dot input and dot output as well as the bounds-in-parent of the nodes prior to and after laying out to identify problems (origin, axis direction, scale factor when transferring coordinates to/from dot, etc.).
Btw, I have some experience with integrating Graphviz in a Zest-based application, too, and it is planned that a dot executable is contributed to Eclipse at some point [1]. Moreover, the 0.2.0 NodeContentPart was not so well written JavaFX, but a (relatively) thought-through replacement is planned to be shipped with GEF 5.0.0, together with some other Zest improvements (e.g. background layout). So if you encounter issues with the Graphviz integration, or if you have any questions regarding NodeContentPart, feel free to ask.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=491098
Best regards,
Matthias
|
|
|
|
|
Re: [Zest] [message #1748270 is a reply to message #1748249] |
Mon, 21 November 2016 11:37  |
Eclipse User |
|
|
|
When the area changes in which a layout algorithm is allowed to place nodes and edges, then the layout-model -- its layout-bounds property to be specific -- is adjusted accordingly, and hence, a layout-pass is performed. This is controlled by GraphLayoutBehavior via listeners on the viewer bounds or the layout-bounds of a node containing a nested graph, respectively.
Currently, when calling ZestContentViewer#refresh() the current contents are replaced with new contents that are computed using the IContentProvider and ILabelProvider, thus losing all layout information.
Best regards,
Matthias
|
|
|
Powered by
FUDForum. Page generated in 0.03593 seconds