net.sac.htmlwriter.element
Class Table

java.lang.Object
  extended by net.sac.htmlwriter.element.Element
      extended by net.sac.htmlwriter.element.Table

public class Table
extends Element


Field Summary
 
Fields inherited from class net.sac.htmlwriter.element.Element
ALLOWED_CHILD_TAGS_NONE, ALLOWED_CHILD_TAGS_TEXT_ONLY
 
Constructor Summary
Table(int cols)
           
 
Method Summary
 void addCell(Element element)
           
 void addCell(Element element, TableCell.Align align)
           
 void addCell(java.lang.String text)
           
 void addCell(java.lang.String text, TableCell.Align align)
           
 void addCell(TableCell tableCell)
          Add a cell to the table.
 void addFooterCell(TableCell tableCell)
          Add a footer cell to the table.
 void addFooterRow(java.util.List<TableCell> tableCells)
          Add a footer row using the given list of table cells.
 void addHeaderCell(java.lang.String headerText)
           
 void addHeaderCell(TableCell tableCell)
          Add a header cell to the table.
 void addHeaderRow(java.util.List<TableCell> tableCells)
          Add a header row using the given list of table cells.
 void addRow(java.util.List<TableCell> tableCells)
          Add a row using the given list of table cells.
 
Methods inherited from class net.sac.htmlwriter.element.Element
addAttribute, addChild, getAttribute, getChild, getChildIndex, getChildren, getTagName, insertChild, setAttribute, toHtml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table(int cols)
Method Detail

addHeaderRow

public void addHeaderRow(java.util.List<TableCell> tableCells)
                  throws HtmlException
Add a header row using the given list of table cells. The span of the table cells is not checked against the specified number of table columns when using this method.

Parameters:
tableCells -
Throws:
HtmlException

addHeaderCell

public void addHeaderCell(TableCell tableCell)
                   throws HtmlException
Add a header cell to the table. Row breaking occurs automatically.

Parameters:
tableCell -
Throws:
HtmlException

addHeaderCell

public void addHeaderCell(java.lang.String headerText)
                   throws HtmlException
Throws:
HtmlException

addRow

public void addRow(java.util.List<TableCell> tableCells)
            throws HtmlException
Add a row using the given list of table cells. The span of the table cells is not checked against the specified number of table columns when using this method.

Parameters:
tableCells -
Throws:
HtmlException

addCell

public void addCell(TableCell tableCell)
             throws HtmlException
Add a cell to the table. Row breaking occurs automatically.

Parameters:
tableCell -
Throws:
HtmlException

addCell

public void addCell(Element element)
             throws HtmlException
Throws:
HtmlException

addCell

public void addCell(java.lang.String text)
             throws HtmlException
Throws:
HtmlException

addCell

public void addCell(Element element,
                    TableCell.Align align)
             throws HtmlException
Throws:
HtmlException

addCell

public void addCell(java.lang.String text,
                    TableCell.Align align)
             throws HtmlException
Throws:
HtmlException

addFooterRow

public void addFooterRow(java.util.List<TableCell> tableCells)
                  throws HtmlException
Add a footer row using the given list of table cells. The span of the table cells is not checked against the specified number of table columns when using this method.

Parameters:
tableCells -
Throws:
HtmlException

addFooterCell

public void addFooterCell(TableCell tableCell)
                   throws HtmlException
Add a footer cell to the table. Row breaking occurs automatically.

Parameters:
tableCell -
Throws:
HtmlException