* @return The {@.html <TD>} tags contained by this tag.
*/
public TableColumn[] getColumns ()
{
NodeList kids;
NodeClassFilter cls;
HasParentFilter recursion;
NodeFilter filter;
TableColumn[] ret;
kids = getChildren ();
if (null != kids)
{
cls = new NodeClassFilter (TableRow.class);
recursion = new HasParentFilter (null);
filter = new OrFilter (
new AndFilter (
cls,
new IsEqualFilter (this)),
new AndFilter ( // recurse up the parent chain
new NotFilter (cls), // but not past the first row
recursion));
recursion.setParentFilter (filter);
kids = kids.extractAllNodesThatMatch (
// it's a column, and has this row as it's enclosing row
new AndFilter (
new NodeClassFilter (TableColumn.class),
filter), true);
ret = new TableColumn[kids.size ()];
kids.copyToNodeArray (ret);
}
else