Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how to use FanRouter??
how to use FanRouter?? [message #217417] Tue, 06 June 2006 05:34 Go to next message
Eclipse UserFriend
Originally posted by: ask.sina.com

I use it as follows, but it doesn't work

in the Connection editorpart file's createfigure():
PolylineConnection conn = new PolylineConnection();
conn.setTargetDecoration(new PolygonDecoration());

lable.setForegroundColor(new Color(null, 231, 231, 69));
Font newFont = new Font(null, new FontData("myfont", 20, SWT.NORMAL));
lable.setFont(newFont);
conn.add(lable, new MidpointLocator(conn, 0));

return conn;

in the NodeEditPart's refreshVisuals method:
ConnectionLayer cLayer = (ConnectionLayer) getLayer(CONNECTION_LAYER);
FanRouter router = new FanRouter();
router.setNextRouter(new BendpointConnectionRouter());
cLayer.setConnectionRouter(router);

why?
thanks in advance
Re: how to use FanRouter?? [message #217427 is a reply to message #217417] Tue, 06 June 2006 06:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ask.sina.com

sorry
the second part codes are in diagramEditpart file.
Re: how to use FanRouter?? [message #217433 is a reply to message #217417] Tue, 06 June 2006 07:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ask.sina.com

I know the reason, but why?

it doesn't work in GEF with EMF,
but, it works well in GEF only
why?
how to modufy?
Re: how to use FanRouter?? [message #217440 is a reply to message #217417] Tue, 06 June 2006 09:05 Go to previous message
Eclipse UserFriend
Originally posted by: ask.sina.com

EllipseAnchor and FanRouter can't be used together, may be EllipseAnchor
has not override the equals method:(
Previous Topic:Guidance needing on writing a draw2d LayoutManager
Next Topic:Any good GEF book?
Goto Forum:
  


Current Time: Fri Apr 26 05:13:47 GMT 2024

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

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

Back to the top