public static boolean isOverSelection(final @NotNull JTree tree, final @NotNull Point point) {
    TreePath path = tree.getPathForLocation(point.x, point.y);
    return path != null && tree.getSelectionModel().isPathSelected(path);
  }
public static boolean isOverSelection(final @NotNull JTree tree, final @NotNull Point point)