在同一图形框架编辑器中实现不同路由,主要是在连线的EditPart中设置,在CreatNewWire()方法中作修改
protected IFigure createFigure() {
if (getWire() == null)
return null;
PolylineConnection conn = new PolylineConnection();
if(this.getSource().getParent() instanceof ContainerEditPart) {
conn.setConnectionRouter(new MyManhattanConnectionRouter());
}
return conn;
}
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}