Integrate tree drawing algorithm in GEF editor? [message #889932] |
Wed, 20 June 2012 09:46 |
|
Dear community,
I'm trying to get my head around the following issue.
I have a GEF editor which contains a graph, basically a parse tree (check en.wikipedia.org/wiki/Parse_tree#Constituency-based_parse_trees). At the moment, it is laid out "by foot" using a simple algorithm to calculate the positions of nodes.
I would like to use a tree drawing algorithm by Buchheim et al. (google "Improving Walker's Algorithm to Run in Linear Time", I cannot post links yet) to lay out the graph automatically, but cannot for the life of me figure out where to start.
Please kindly comment on the following (probably confused) starting points/options I have come up with. Are any of them possible? What would be a good way to go about this?
1) Implement a custom Draw2D layout manager which reflects the algorithm. Possibly along the lines of what CompoundDirectedGraphLayout does.
2) Use XYLayout, but calculate the position of the nodes in the respective EditParts by calling an algorithm class. Is this possible at all?
My head is really spinning cos I can't figure this out. Thanks for any help!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02999 seconds