KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > meterware > httpunit > TableRow


1 /*
2  * fgiust
3  * PATCHED to add support for table rows
4  */

5 package com.meterware.httpunit;
6
7 import java.net.URL JavaDoc;
8 import java.util.ArrayList JavaDoc;
9
10 import org.w3c.dom.Element JavaDoc;
11
12
13 /**
14  * A single row in an HTML table.
15  */

16 public class TableRow extends BlockElement
17 {
18
19     TableRow(
20         WebResponse response,
21         FrameSelector frame,
22         Element JavaDoc tablerowNode,
23         URL JavaDoc url,
24         String JavaDoc parentTarget,
25         String JavaDoc characterSet)
26     {
27         super(response, frame, url, parentTarget, tablerowNode, characterSet);
28     }
29
30     public TableCell[] getCells()
31     {
32         return (TableCell[]) _cells.toArray(new TableCell[_cells.size()]);
33     }
34
35     void addTableCell(TableCell cell)
36     {
37         _cells.add(cell);
38     }
39
40     TableCell newTableCell(Element JavaDoc element)
41     {
42         return new TableCell(this.getResponse(), _frame, element, _baseURL, _baseTarget, _characterSet);
43     }
44
45     private ArrayList JavaDoc _cells = new ArrayList JavaDoc();
46
47 }
Popular Tags