private void printCell(TableModel model, TextTableFormat format, Table.Cell<Integer, Integer, Object> cell) {
        int numColumns = format.numColumns();
        int colKey = cell.getColumnKey();
        int rowKey = cell.getRowKey();

        // print new line after the last cell of a row
        if (colKey == 0) {
            if (rowKey != 0) {
                out.println();
            }

            // print column header separator for first and second row
            if (model.columnHeader() && colKey == 0 && rowKey == 1) {
                for (int i = 0; i < numColumns; i++) {
                    out.print(StringUtils.repeat(rowSeparator, format.columnWidth(i)));
                    if (i != numColumns - 1) {
                        out.print(cellSeparator);
                    }
                }
                out.println();
            }
        }

        out.print(format.formatCell(cell.getValue(), colKey));

        // print cell separator unless it's the last cell
        if (colKey != numColumns - 1) {
            out.print(cellSeparator);
        }
    }
@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-cli/src/main/java/info/ata4/disunity/cli/util/TextTablePrinter.java