private void writeHeader(Database db, int numberOfColumns, boolean hasRelationships, boolean hasOrphans, LineWriter html) throws IOException, SQLException {
private void writeHeader(Database db, int numberOfColumns, boolean hasRelationships, boolean hasOrphans, LineWriter html) throws IOException {
    private void writeHeader(Database db, int numberOfColumns, boolean hasRelationships, boolean hasOrphans, LineWriter html) throws IOException, SQLException {        writeHeader(db, null, "Columns", hasRelationships, hasOrphans, html);        html.writeln("<table width='100%' border='0'>");        html.writeln("<tr><td class='container'>");        writeGeneratedBy(db.getConnectTime(), html);        html.writeln("</td><td class='container' rowspan='2' align='right' valign='top'>");        writeLegend(false, false, html);        html.writeln("</td></tr>");        html.writeln("<tr valign='top'><td class='container' align='left' valign='top'>");        html.writeln("<p/>");        StyleSheet css = StyleSheet.getInstance();        html.writeln("<form name='options' action=''>");        html.writeln(" <input type=checkbox onclick=\"toggle(" + css.getOffsetOf(".tableKey") + ");\" id=showRelatedCols>Related columns");        html.writeln(" <input type=checkbox onclick=\"toggle(" + css.getOffsetOf(".constraint") + ");\" id=showConstNames>Constraint names");        html.writeln(" <input type=checkbox checked onclick=\"toggle(" + css.getOffsetOf(".legend") + ");\" id=showLegend>Legend");        html.writeln("</form>");        html.writeln("</table>");        html.writeln("<div class='indent'>");        html.write("<b>");        html.write(db.getName());        if (db.getSchema() != null) {            html.write('.');            html.write(db.getSchema());        }        html.write(" contains ");        html.write(String.valueOf(numberOfColumns));        html.write(" columns:</b>");        Collection tables = db.getTables();        boolean hasTableIds = tables.size() > 0 && ((Table)tables.iterator().next()).getId() != null;        HtmlTablePage.getInstance().writeMainTableHeader(hasTableIds, true, html);        html.writeln("<tbody valign='top'>");    }