Skip to main content



      Home
Home » Eclipse Projects » GEF » CompoundDirectedGraphLayout and node orientation
CompoundDirectedGraphLayout and node orientation [message #246919] Tue, 20 January 2009 11:26 Go to next message
Eclipse UserFriend
Dear GEF/Draw2D gurus,

I have studied the org.eclipse.gef.examples.flow and it does an automatic
layout of nodes vertically, except for different "branches" which are laid
out horizontally.

Node1
|
Node2------Node4
| |
Node3 Node5
|
Node6


I've seen that the class responsible for this is
CompoundDirectedGraphLayout.

I need just the opposite behaviour:

nodes arranged horizontally, and "branches" vertically

Node1 -- Node2 -- Node3 -- Node6
|
+------Node4 -- Node5


Is this easily possible?
There is no much doc about this, so any indication would be very useful.
Thanks in advance for any hint.

David
Re: CompoundDirectedGraphLayout and node orientation [message #246925 is a reply to message #246919] Tue, 20 January 2009 12:03 Go to previous messageGo to next message
Eclipse UserFriend
I answer myself:

compoundDirectedGraph.setDirection(PositionConstants.EAST);

I have now only to fix the origin and destination anchor points of the
edges.

Horizontal edges go from the top left corner of the source node (at the
left) to the bottom left of the target node (at the right), so the line is
not fully horizontal but sloped downwards.

Any idea please?

David Pérez wrote:

> Dear GEF/Draw2D gurus,

> I have studied the org.eclipse.gef.examples.flow and it does an automatic
> layout of nodes vertically, except for different "branches" which are laid
> out horizontally.

> Node1
> |
> Node2------Node4
> | |
> Node3 Node5
> |
> Node6


> I've seen that the class responsible for this is
> CompoundDirectedGraphLayout.

> I need just the opposite behaviour:

> nodes arranged horizontally, and "branches" vertically

> Node1 -- Node2 -- Node3 -- Node6
> |
> +------Node4 -- Node5


> Is this easily possible?
> There is no much doc about this, so any indication would be very useful.
> Thanks in advance for any hint.

> David
Re: CompoundDirectedGraphLayout and node orientation [message #246966 is a reply to message #246925] Wed, 21 January 2009 09:32 Go to previous message
Eclipse UserFriend
If necessary I can provide a screenshot.

David Pérez wrote:

> I have now only to fix the origin and destination anchor points of the
> edges.

> Horizontal edges go from the top left corner of the source node (at the
> left) to the bottom left of the target node (at the right), so the line is
> not fully horizontal but sloped downwards.

> Any idea please?
Previous Topic:CompoundDirectedGraphLayout has no effect
Next Topic:Problems running draw2d examples
Goto Forum:
  


Current Time: Sat Nov 08 22:04:34 EST 2025

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

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

Back to the top