public static void avoidDoubleBorders ( @ Nonnull final PLTable ret ) { boolean bPreviousRowHasBottomBorder = false ; for ( int i = 0 ; i < ret . getRowCount ( ) ; i ++ ) { boolean bRowHasBottomBorder = true ; boolean bRowHasTopBorder = true ; final PLTableRow aRow = ret . getRowAtIndex ( i ) ; for ( int j = 0 ; j < aRow . getColumnCount ( ) ; j ++ ) { final PLTableCell aCell = aRow . getCellAtIndex ( j ) ; if ( aCell . getBorderBottomWidth ( ) == 0 ) bRowHasBottomBorder = false ; if ( aCell . getBorderTopWidth ( ) == 0 ) bRowHasTopBorder = false ; } if ( bPreviousRowHasBottomBorder && bRowHasTopBorder ) aRow . setBorderTop ( null ) ; bPreviousRowHasBottomBorder = bRowHasBottomBorder ; } }
If two joined rows both have borders at their connecting side the doubles width has to be removed