@Override
      protected @NotNull MouseEvent convert(@NotNull MouseEvent event) {
        JTree tree = getTree();
        if (tree == null || tree != event.getSource() || !tree.isEnabled()) {
          return event;
        }

        if (!event.isConsumed() && SwingUtilities.isLeftMouseButton(event)) {
          int x = event.getX();
          int y = event.getY();
          TreePath path = getClosestPathForLocation(tree, x, y);
          if (path != null && !isLocationInExpandControl(path, x, y)) {
            Rectangle bounds = getPathBounds(tree, path);
            if (bounds != null && bounds.y <= y && y <= (bounds.y + bounds.height)) {
              x = Math.max(bounds.x, Math.min(x, bounds.x + bounds.width - 1));
              if (x != event.getX()) {
                event = convert(event, tree, x, y);
              }
            }
          }
        }
        return event;
      }
@Override
      protected @NotNull MouseEvent convert(@NotNull MouseEvent event)