public void setCellFormatAttributes ( WritableCellFormat cellFormat , FileColumn column ) { try { if ( cellFormat != null && column != null ) { Alignment a = Alignment . GENERAL ; short align = column . getAlign ( ) ; if ( align == FileColumn . ALIGN_CENTRE ) a = Alignment . CENTRE ; else if ( align == FileColumn . ALIGN_LEFT ) a = Alignment . LEFT ; else if ( align == FileColumn . ALIGN_RIGHT ) a = Alignment . RIGHT ; else if ( align == FileColumn . ALIGN_JUSTIFY ) a = Alignment . JUSTIFY ; else if ( align == FileColumn . ALIGN_FILL ) a = Alignment . FILL ; cellFormat . setAlignment ( a ) ; cellFormat . setWrap ( column . getWrap ( ) ) ; } } catch ( WriteException e ) { logger . severe ( StringUtilities . serialize ( e ) ) ; } }
Sets the cell attributes from the given column .