current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next;  while (next != null && !tree.isVisible(current)) { next = getNextNode(next);  if (next != null) current = new TreePath(getPathToRoot(next, 0)); }
Object[] nodes = currentVisiblePath.getPath(); int i = 0; while (i < nodes.length && !node.equals(nodes[i])) i++;  if (i+1 < nodes.length) return nodes[i+1];
  Object getNextVisibleNode(Object node)  {    Object next = null;    TreePath current = null;    if (node != null)      next = getNextNode(node);    if (next != null)      {        current = new TreePath(getPathToRoot(next, 0));        if (tree.isVisible(current))          return next;        while (next != null && !tree.isVisible(current))          {            next = getNextNode(next);            if (next != null)              current = new TreePath(getPathToRoot(next, 0));          }      }    return next;  }