public Rectangular getCellBoundsRelative ( int x , int y ) { int x1 = getColOfs ( x ) ; int y1 = getRowOfs ( y ) ; int x2 = ( x == width - 1 ) ? abspos . getWidth ( ) - 1 : x1 + cols [ x ] - 1 ; int y2 = ( y == height - 1 ) ? abspos . getHeight ( ) - 1 : y1 + rows [ y ] - 1 ; return new Rectangular ( x1 , y1 , x2 , y2 ) ; }
Computes the coordinates of the specified grid cell relatively to the area top left corner .