public boolean setWidths ( float widths [ ] ) { if ( widths . length != cells . length ) return false ; System . arraycopy ( widths , 0 , this . widths , 0 , cells . length ) ; float total = 0 ; calculated = false ; for ( int k = 0 ; k < widths . length ; ++ k ) { PdfPCell cell = cells [ k ] ; if ( cell == null ) { total += widths [ k ] ; continue ; } cell . setLeft ( total ) ; int last = k + cell . getColspan ( ) ; for ( ; k < last ; ++ k ) total += widths [ k ] ; -- k ; cell . setRight ( total ) ; cell . setTop ( 0 ) ; } return true ; }
Sets the widths of the columns in the row .