protected Shape getBarShadowBounds(double x,double y){
double deltaX=x-x0;
CoordinatesConverter coord=getCoord();
GraphicNode node=(GraphicNode)selected;
Rectangle2D bounds;
double xStart=coord.toX((selectedIntervalNumber==0&&state==BAR_MOVE)?node.getStart():selectedInterval.getStart());
if (state==PROGRESS_BAR_MOVE){
double completedX=coord.toX(node.getCompleted());//CoordinatesConverter.adaptSmallBarEndX(xStart,coord.toX(node.getCompleted()),config);
bounds=new Rectangle2D.Double(xStart,((GanttUI)ui).getBarY(node.getRow())+node.getGanttShapeOffset()+(node.getGanttShapeHeight()-config.getGanttProgressBarHeight())/2,completedX-xStart+deltaX,config.getGanttProgressBarHeight());
}else{
double xEnd=(selectedIntervalNumber==0&&state==BAR_MOVE)?CoordinatesConverter.adaptSmallBarEndX(coord.toX(node.getStart()),coord.toX(node.getEnd()),node,config):coord.toX(selectedInterval.getEnd());
double w=xEnd-xStart;
switch (state) {
case BAR_MOVE:
bounds=new Rectangle2D.Double(xStart+deltaX,((GanttUI)ui).getBarY(node.getRow())+node.getGanttShapeOffset(),w,node.getGanttShapeHeight());
break;
case BAR_MOVE_START:
bounds=new Rectangle2D.Double(xStart+deltaX,((GanttUI)ui).getBarY(node.getRow())+node.getGanttShapeOffset(),w-deltaX,node.getGanttShapeHeight());
break;
case BAR_MOVE_END:
bounds=new Rectangle2D.Double(xStart,((GanttUI)ui).getBarY(node.getRow())+node.getGanttShapeOffset(),w+deltaX,node.getGanttShapeHeight());
break;
default:
return null;
}
}