package pt.ist.renderers.components; import java.util.ArrayList; import java.util.List; import javax.servlet.jsp.PageContext; import pt.ist.renderers.components.tags.HtmlTag; public class HtmlTableHeader extends HtmlComponent { private List rows; public HtmlTableHeader() { rows = new ArrayList(); } public HtmlTableRow createRow() { HtmlTableRow row = new HtmlTableHeaderRow(); this.rows.add(row); return row; } @Override public List getChildren() { return new ArrayList(rows); } public List getRows() { return this.rows; } @Override public HtmlTag getOwnTag(PageContext context) { HtmlTag tag = super.getOwnTag(context); tag.setName("thead"); for (HtmlTableRow row : this.rows) { tag.addChild(row.getOwnTag(context)); } return tag; } }