@ -114,39 +114,39 @@ public abstract class AbstractPlotRenderer<TLane extends PlotLane, TColor> {
drawLine ( myColor , myLaneX , h , myLaneX , ( h + dotSize ) / 2 ,
drawLine ( myColor , myLaneX , h , myLaneX , ( h + dotSize ) / 2 ,
LINE_WIDTH ) ;
LINE_WIDTH ) ;
for ( int i = 0 ; i < commit . mergingLanes . length ; i + + ) {
for ( PlotLane mergingLane : commit . mergingLanes ) {
final TLane pLane = ( TLane ) commit . mergingLanes [ i ] ;
final TLane pLane = ( TLane ) mergingLane ;
final TColor pColor = laneColor ( pLane ) ;
final TColor pColor = laneColor ( pLane ) ;
final int cx = laneC ( pLane ) ;
final int cx = laneC ( pLane ) ;
if ( Math . abs ( myLaneX - cx ) > LANE_WIDTH ) {
if ( Math . abs ( myLaneX - cx ) > LANE_WIDTH ) {
final int ix ;
final int ix ;
if ( myLaneX < cx )
if ( myLaneX < cx ) {
ix = cx - LANE_WIDTH / 2 ;
ix = cx - LANE_WIDTH / 2 ;
else
} else {
ix = cx + LANE_WIDTH / 2 ;
ix = cx + LANE_WIDTH / 2 ;
}
drawLine ( pColor , myLaneX , h / 2 , ix , h / 2 , LINE_WIDTH ) ;
drawLine ( pColor , myLaneX , h / 2 , ix , h / 2 , LINE_WIDTH ) ;
drawLine ( pColor , ix , h / 2 , cx , h , LINE_WIDTH ) ;
drawLine ( pColor , ix , h / 2 , cx , h , LINE_WIDTH ) ;
} else
} else
drawLine ( pColor , myLaneX , h / 2 , cx , h , LINE_WIDTH ) ;
drawLine ( pColor , myLaneX , h / 2 , cx , h , LINE_WIDTH ) ;
maxCenter = Math . max ( maxCenter , cx ) ;
maxCenter = Math . max ( maxCenter , cx ) ;
}
}
}
}
if ( commit . getChildCount ( ) > 0 ) {
if ( commit . getChildCount ( ) > 0 ) {
for ( int i = 0 ; i < commit . forkingOffLanes . length ; i + + ) {
for ( PlotLane forkingOffLane : commit . forkingOffLanes ) {
final TLane childLane = ( TLane ) commit . forkingOffLanes [ i ] ;
final TLane childLane = ( TLane ) forkingOffLane ;
final TColor cColor = laneColor ( childLane ) ;
final TColor cColor = laneColor ( childLane ) ;
final int cx = laneC ( childLane ) ;
final int cx = laneC ( childLane ) ;
if ( Math . abs ( myLaneX - cx ) > LANE_WIDTH ) {
if ( Math . abs ( myLaneX - cx ) > LANE_WIDTH ) {
final int ix ;
final int ix ;
if ( myLaneX < cx )
if ( myLaneX < cx ) {
ix = cx - LANE_WIDTH / 2 ;
ix = cx - LANE_WIDTH / 2 ;
else
} else {
ix = cx + LANE_WIDTH / 2 ;
ix = cx + LANE_WIDTH / 2 ;
}
drawLine ( cColor , myLaneX , h / 2 , ix , h / 2 , LINE_WIDTH ) ;
drawLine ( cColor , myLaneX , h / 2 , ix , h / 2 , LINE_WIDTH ) ;
drawLine ( cColor , ix , h / 2 , cx , 0 , LINE_WIDTH ) ;
drawLine ( cColor , ix , h / 2 , cx , 0 , LINE_WIDTH ) ;