if (expanded.contains(node) || parent == null)
if (expanded.contains(node))
  private final void countRows(Object node, Object parent, int depth)  {    Integer n = new Integer(row2node.size());    row2node.put(n, node);        NodeRecord nr = new NodeRecord(n.intValue(), depth, node, parent);    nodes.put(node, nr);         // For expanded nodes and for the root node.    if (expanded.contains(node) || parent == null)      {        int sc = treeModel.getChildCount(node);        int deeper = depth+1;        for (int i = 0; i < sc; i++)  {            Object child = treeModel.getChild(node, i);            countRows(child, node, deeper);          }      }  } 