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 01:34 Go to next message
Eclipse User
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 02:11 Go to previous messageGo to next message
Eclipse User
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 03:09 Go to previous messageGo to next message
Eclipse User
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 05:05 Go to previous message
Eclipse User
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: Thu Aug 28 09:14:17 EDT 2014

Powered by FUDForum. Page generated in 0.01749 seconds