format = (BarFormat)arg0;
GanttLinkRouting routing=(GanttLinkRouting)((GanttParams)graphInfo).getRouting();
CoordinatesConverter coord=((GanttParams)graphInfo).getCoord();
//if (format.getMiddle()!=null){
GraphicNode from=dependency.getPredecessor();
GraphicNode to=dependency.getSuccessor();
int type=dependency.getType();
int fromSign=(type==DependencyType.SF||type==DependencyType.SS)?-1:1;
int toSign=(type==DependencyType.FS||type==DependencyType.SS)?-1:1;
double fx0=coord.toX(from.getStart());
double fx1=coord.toX(from.getEnd());
fx1=CoordinatesConverter.adaptSmallBarEndX(fx0,fx1,from,config);
double tx0=coord.toX(to.getStart());
double tx1=coord.toX(to.getEnd());
tx1=CoordinatesConverter.adaptSmallBarEndX(tx0,tx1,to,config);
double x0=fromSign<0?fx0:fx1;
double x1=toSign<0?tx0:tx1;
int rowHeight=((GanttParams)graphInfo).getRowHeight();
int yOffset=config.getGanttBarYOffset()+config.getGanttBarHeight()/2;
int y0=rowHeight*from.getRow();
int y1=rowHeight*to.getRow();
double y2=Math.max(y0,y1);
y0+=yOffset;
y1+=yOffset;
GeneralPath path=dependency.getPath();
((GanttLinkRouting)routing).routePath(path,x0,y0,x1,y1,y2,y1+to.getGanttShapeHeight()/2,y1-to.getGanttShapeHeight()/2,type);
Color oldColor=g2.getColor();
Stroke oldStroke = g2.getStroke();