|
Re: [Zest] [message #1746639 is a reply to message #1746504] |
Wed, 02 November 2016 12:06   |
|
Hi Christoph,
I am unsure what you mean by polar point, can you give an example?
The center position and the size of the nodes can be specified via LayoutProperties (LOCATION_PROPERTY and SIZE_PROPERTY). These need to be computed from ZestProperties prior to running a layout pass, and they need to be transferred to ZestProperties after running a layout pass. The code for transferring the properties should already be present, so that your algorithm can use the LayoutProperties without caring about ZestProperties.
What exactly are the problems that you encounter?
Best regards,
Matthias
|
|
|
|
Re: [Zest] [message #1746708 is a reply to message #1746646] |
Thu, 03 November 2016 15:06   |
|
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 16:37  |
|
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.02271 seconds