| | |
| | | */ |
| | | private final class Serializer extends TableSerializer { |
| | | |
| | | // The current column being output. |
| | | private int column = 0; |
| | | |
| | | /*The real column widths taking into account size constraints but |
| | | not including padding or separators.*/ |
| | | private final List<Integer> columnWidths = new ArrayList<Integer>(); |
| | |
| | | @Override |
| | | public void addCell(String s) { |
| | | currentRow.add(s); |
| | | column++; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | |
| | | @Override |
| | | public void startHeader() { |
| | | determineColumnWidths(); |
| | | |
| | | column = 0; |
| | | currentRow.clear(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void startRow() { |
| | | column = 0; |
| | | currentRow.clear(); |
| | | } |
| | | |