@Override
  public int getRowForPath(JTree tree, TreePath path) {
    if (path == null || !isValid(tree)) return -1;
    return super.getRowForPath(tree, path);
  }
@Override
  public int getRowForPath(JTree tree, TreePath path)