|
[Zest] Re: Zest - Overlapping Nodes [message #240583 is a reply to message #240519] |
Fri, 11 January 2008 05:23   |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
Thanks for the kind words :-)
I removed the overlapping style because I didn't really work, or make
sense. The problem is, a user can drag a node anywhere, so what happens
when a node is placed on top of another node. We tried to do some
clever things, but it never actually does what you want.
What I have done, is applied a node overlap removal layout algorithm
after I apply my initial layout.
viewer.setLayoutAlgorithm(new
CompositeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZIN G, new
LayoutAlgorithm[] { new
DirectedGraphLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RES IZING), new
HorizontalShift(LayoutStyles.NO_LAYOUT_NODE_RESIZING) }));
What this does, is it creates a composite layout algorithm, first
applying the directed graph layout, and then shifting the nodes
horizontally so they don't overlap.
Would something like work for you? I also have a the prototype for a
general layout algorithm that removes all overlaps (I actually wrote it
last year during EclipseCon) which I could provide, however, it often
produces terrible graphs because it just keeps pushing everything away
until all the overlaps are gone, and sometimes things get really far away.
Cheers,
ian
Michelle Tadmor wrote:
> Hey currently the graph opens with the nodes all overlapping. i saw in previous versions you had a style flag NO_OVERLAPPING_NODES but it has been erased. what would be the new way of achieving that?
>
> Thanks! I really like Zest... very sleek.
|
|
|
|
Re: [Zest] Re: Zest - Overlapping Nodes [message #243368 is a reply to message #240701] |
Wed, 04 June 2008 09:21  |
Eclipse User |
|
|
|
Originally posted by: realbondy.gmail.com
Hi Michelle,
I happen to have the similar needs as you, i need to avoid overlapping
figures as i have some decorator on one of them, which is on the other
layer.
I am new to GEF, is it possible that you send some code snippet about
how you do that? Or just some directions.
Any response is highly appreciated!
Thanks!
Binbin Deng
Michelle Tadmor wrote:
> Thanks Ian!
>
> it worked but we have a few more needs from the layout so i ended up writing one of my own. it's kind of a tree layout that spreads the nodes from root (one who has no one destines to) down in rows. i can send the code if you like. and i've parameterized the distances beween the nodes to suit different needs.
>
> i'm having a bit of trouble when writing a layout which relies on the actual model. i'm gonna open a separate thread on that.
|
|
|
Powered by
FUDForum. Page generated in 0.02134 seconds