public int getMaximalColumnWidth ( int col ) { int ret = 0 ; int r = 0 ; while ( r < getRowCount ( ) ) { TableCellBox cell = cells [ col ] [ r ] ; if ( cell != null ) { int max = cell . getMaximalWidth ( ) / cell . getColspan ( ) ; if ( max > ret ) ret = max ; r += cell . getRowspan ( ) ; } else r ++ ; } return ret ; }
Determine the maximal width of the column