Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zest - Overlapping Nodes
Zest - Overlapping Nodes [message #240519] Wed, 09 January 2008 09:40 Go to next message
Michelle Tadmor is currently offline Michelle TadmorFriend
Messages: 23
Registered: July 2009
Junior Member
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.
[Zest] Re: Zest - Overlapping Nodes [message #240583 is a reply to message #240519] Fri, 11 January 2008 05:23 Go to previous messageGo to next message
Eclipse UserFriend
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 #240701 is a reply to message #240583] Mon, 14 January 2008 13:02 Go to previous messageGo to next message
Michelle Tadmor is currently offline Michelle TadmorFriend
Messages: 23
Registered: July 2009
Junior Member
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.
Re: [Zest] Re: Zest - Overlapping Nodes [message #243368 is a reply to message #240701] Wed, 04 June 2008 09:21 Go to previous message
Eclipse UserFriend
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.
Previous Topic:[Announce] GEF 3.4.0RC3 is available
Next Topic:key listener problem in editor
Goto Forum:
  


Current Time: Fri Apr 19 14:30:26 GMT 2024

Powered by FUDForum. Page generated in 0.01906 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top