private Border getBorder ( int row , int column ) { if ( row % 3 == 2 ) { switch ( column % 3 ) { case 2 : return BOTTOM_RIGHT_BORDER ; case 0 : return BOTTOM_LEFT_BORDER ; default : return BOTTOM_BORDER ; } } else if ( row % 3 == 0 ) { switch ( column % 3 ) { case 2 : return TOP_RIGHT_BORDER ; case 0 : return TOP_LEFT_BORDER ; default : return TOP_BORDER ; } } switch ( column % 3 ) { case 2 : return RIGHT_BORDER ; case 0 : return LEFT_BORDER ; default : return null ; } }
Get appropriate border for cell based on its position in the grid .