Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2D DirectedGraph with feedback
Draw2D DirectedGraph with feedback [message #159038] Mon, 22 November 2004 14:17
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 004E83AA85256F54_=
Content-Type: text/plain; charset="US-ASCII"

This is a follow-on to a previous question that I was helped with
(thanks).
I am using a variation on DirectedGraphDemo to draw a tree. My tree needs
to have outputs coming out the bottom of each node, and inputs coming in
the top. I got this working just fine using a modification of
TopOrBottomAnchor. However I also have feedback edges (which go out the
bottom of a lower node and come in the top of a higher node). Currently
these are being drawn straight from one to the other (right through the
nodes). I would like to have them go down and over and up and over and in,
if you know what I mean. It seems logical that virtual nodes on the
specific edge should do the trick. I was hoping that in this way the nice
automatic layout of edges that takes place (say between nodes that differ
by more than one in rank) would help route my feedback edges as well. So I
was attempting to go one higher in rank (for the downward path), then down
in rank until I was one below the rank of my target to get the desired
effect. However it seems that some code in the Edge class is implicitly
assuming that virtual nodes lie (in rank) between the source and target
ranks. I was hoping to use both larger and smaller ranks than target and
source to accomplish my "bend around." (the code which is crashing is in
getIndexForRank(int rank) ).

Is there a different/better way to accomplish what I'm trying to do?


Any help is appreciated.
--=_alternative 004E83AA85256F54_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">This is a follow-on to a previous question
that I was helped with (thanks).</font>
<br><font size=2 face="sans-serif">I am using a variation on DirectedGraphDemo
to draw a tree. My tree needs to have outputs coming out the bottom of
each node, and inputs coming in the top. I got this working just fine using
a modification of TopOrBottomAnchor. However I also have feedback edges
(which go out the bottom of a lower node and come in the top of a higher
node). Currently these are being drawn straight from one to the other (right
through the nodes). I would like to have them go down and over and up and
over and in, if you know what I mean. It seems logical that virtual nodes
on the specific edge should do the trick. I was hoping that in this way
the nice automatic layout of edges that takes place (say between nodes
that differ by more than one in rank) would help route my feedback edges
as well. So I was attempting to go one higher in rank (for the downward
path), then down in rank until I was one below the rank of my target to
get the desired effect. &nbsp;However it seems that some code in the Edge
class is implicitly assuming that virtual nodes lie (in rank) between the
source and target ranks. I was hoping to use both larger and smaller ranks
than target and source to accomplish my &quot;bend around.&quot; (the code
which is crashing is in getIndexForRank(int rank) ).</font>
<br>
<br><font size=2 face="sans-serif">Is there a different/better way to accomplish
what I'm trying to do?</font>
<br>
<br>
<br><font size=2 face="sans-serif">Any help is appreciated.</font>
--=_alternative 004E83AA85256F54_=--
Previous Topic:Open GEF Editor Programmatically
Next Topic:DirectedGraph with non-rectangles
Goto Forum:
  


Current Time: Fri Mar 29 05:22:08 GMT 2024

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

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

Back to the top