public static Cell getCell ( Properties attributes ) { Cell cell = new Cell ( ) ; String value ; cell . setHorizontalAlignment ( attributes . getProperty ( ElementTags . HORIZONTALALIGN ) ) ; cell . setVerticalAlignment ( attributes . getProperty ( ElementTags . VERTICALALIGN ) ) ; value = attributes . getProperty ( ElementTags . WIDTH ) ; if ( value != null ) { cell . setWidth ( value ) ; } value = attributes . getProperty ( ElementTags . COLSPAN ) ; if ( value != null ) { cell . setColspan ( Integer . parseInt ( value ) ) ; } value = attributes . getProperty ( ElementTags . ROWSPAN ) ; if ( value != null ) { cell . setRowspan ( Integer . parseInt ( value ) ) ; } value = attributes . getProperty ( ElementTags . LEADING ) ; if ( value != null ) { cell . setLeading ( Float . parseFloat ( value + "f" ) ) ; } cell . setHeader ( Utilities . checkTrueOrFalse ( attributes , ElementTags . HEADER ) ) ; if ( Utilities . checkTrueOrFalse ( attributes , ElementTags . NOWRAP ) ) { cell . setMaxLines ( 1 ) ; } setRectangleProperties ( cell , attributes ) ; return cell ; }
Creates a Cell object based on a list of properties .