*/
public TableHeader[] getHeaders ()
{
NodeList kids;
NodeClassFilter cls;
HasParentFilter recursion;
NodeFilter filter;
TableHeader[] 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 header, and has this row as it's enclosing row
new AndFilter (
new NodeClassFilter (TableHeader.class),
filter), true);