Skip to main content



      Home
Home » Eclipse Projects » GEF » connection routers, etc.
connection routers, etc. [message #68076] Mon, 03 March 2003 17:48 Go to next message
Eclipse UserFriend
Originally posted by: jwoods.journee.com

Does anybody have any sample code for a connection router (or ???) that
behaves like the connections in MagicDraw?

For those not familiar with it, MagicDraw connections are multi-sgmented
lines where each line segment is either vertical or horizontal. Each
"section" may be moved either up/down or left/right - depending upon the
segment's alignment.

Also (in GEF terms), moving a line segment which was at either end would
"move" the connection anchor either up/down or left/right. I'm assuming
there would also have to be a corresponding ConnectionAnchor that knew how
to work with the router perhaps?

For example, if there is a horizontal connection between 2 nodes with 1 line
segment (a straight line between the nodes). You would be able to select
the connection and move it up/down. After being moved, the connection would
still be 1 segment and would still be horizontal. Additional line segments
(and bendpoints) wouldn't be created unless you moved the line above/below
the vertical bounds of one of the nodes.

How would I go about creating such functionality in GEF? New
ConnectionRouter? New ConnectionAnchor? New Polyline subclass? New
PolylineConnection subclass? Connection edit part/policies? All of the
above?

Thanks,

- Jason
Re: connection routers, etc. [message #68438 is a reply to message #68076] Wed, 05 March 2003 13:33 Go to previous message
Eclipse UserFriend
Jason Woods wrote:
> Does anybody have any sample code for a connection router (or ???) that
> behaves like the connections in MagicDraw?

There's no router like this in GEF. The closest we have is the manhattan router, which is very dumb.

> How would I go about creating such functionality in GEF? New
> ConnectionRouter? New ConnectionAnchor? New Polyline subclass? New
> PolylineConnection subclass? Connection edit part/policies? All of the
> above?

I think most of the functionality you need would be placed in a new EditPolicy. You may need a new
ConnectionRouter and most likely a new ConnectionAnchor. I don't believe a new Polyine or
PolylineConnection is necessary. The current implementations should be sufficient.
Previous Topic:what is the stable build of logic example?
Next Topic:Funny tab characters in Draw2d
Goto Forum:
  


Current Time: Sat Jul 26 18:21:53 EDT 2025

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

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

Back to the top