how to use FanRouter?? [message #217417] |
Tue, 06 June 2006 05:34 |
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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.16322 seconds