[Zest] Export Graph or GraphViewer [message #1105173] |
Mon, 09 September 2013 09:09  |
Eclipse User |
|
|
|
Hi everybody,
in my application, i have a GraphViewer with a nested Graph that could be modified by the GUI (Nodes can be added and moved). Is it possible to export or save the complete Graph object into a file so that the user can import and visualize the Graph later in the same application?
Thanks a lot!
|
|
|
Re: [Zest] Export Graph or GraphViewer [message #1105702 is a reply to message #1105173] |
Tue, 10 September 2013 03:21   |
Eclipse User |
|
|
|
Hi,
this approach is not supported directly by Zest. What you can do as a workaround is the following:
1. Traverse all nodes and connections manually, and save them (in any format of your choosing, you are writing the load/save code), including position and size information
2. Create a new layout algorithm, that utilizes this saved position information, and after loading the graph apply this algorithm. You can use also implement some fallback that in case of layout information is missing, apply another layout.
Hope, the idea is clear,
Zoltán
|
|
|
|
Re: [Zest] Export Graph or GraphViewer [message #1112170 is a reply to message #1105173] |
Thu, 19 September 2013 04:00  |
Eclipse User |
|
|
|
Hi,
thanks for your replies. I tried serialization, but i didn't work because the dependencies of graph objects to the framework are to deep.
I've implemented now a simple algorithm that saves only positions, size and other properties within a .xml file. That's enough for me;)
Regards
|
|
|
Powered by
FUDForum. Page generated in 0.04528 seconds