|
|
Re: Manhatten routing dummy connections [message #149260 is a reply to message #149089] |
Tue, 31 August 2004 18:10 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Are you saying that you connection layer's router is NULL, and that the
policy is getting that null and setting it into your feedback connection?
Null would probably be a case it should ignore in case the client has set
another router.
"Cameron Bateman" <cbateman@rim.com> wrote in message
news:ch06e5$lsh$1@eclipse.org...
> Okay, I seem to have figured part of the problem. It turns out that
> GraphicalNodeEditPolicy, which my edit policy is sub-classing overrides
> the dummy connection's ConnectionRouter to the connection layer's default
> router in getFeedbackHelper.
>
> For now I'm going to work-around this by overriding this method so it uses
> the connection router that I want.
>
> Is there a more "correct" way to do this?
>
>
> --Cam
>
> Cameron Bateman wrote:
>
> > Greetings,
>
> > I am trying to get my dummy connection to "Manhattan route" while it is
> > being dragged from source to target. I have noticed that several GEF
> > tools including the Logic example do this, but I can't quite figure out
> > how do it.
>
> > In the edit policy that handles the connection creation, I overrode
> > createDummyConnection as follows:
>
> > protected Connection createDummyConnection(Request req) {
> > Connection conn = new PolylineConnection();
> > conn.setConnectionRouter(new ManhattanConnectionRouter());
> > return conn;
> > }
>
> > When I do something similar for the real connection, it seems to route
the
> > connection just fine, but with the dummy I still get the default
> > "center-to-center" straight line routing.
>
> > Is there something more I need to do here to make this do what I want?
>
> > --Cam
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03089 seconds