private boolean isDraggingEnabled(@NotNull MouseEvent e) {
      if (isOnBorder(e) || !SwingUtilities.isLeftMouseButton(e) || !canMoveOrResizeColumn(e)) return false;
      // can not check for getDragged/Resized column here since they can be set in mousePressed method
      // their presence does not necessarily means something is being dragged or resized
      if (header.getCursor() == Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR) ||
          header.getCursor() == Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)) {
        return true;
      }

      int deltaX = Math.abs(e.getX() - myStartXCoordinate);
      int deltaY = Math.abs(e.getY() - myStartYCoordinate);
      Point point = new Point(MathUtil.clamp(e.getX(), 0, header.getTable().getWidth() - 1), e.getY());
      boolean sameColumn;
      if (header.getDraggedColumn() == null) {
        sameColumn = true;
      }
      else {
        sameColumn = (header.getTable().getColumnModel().getColumn(header.getTable().columnAtPoint(point)) ==
                      header.getDraggedColumn());
      }
      // start dragging only if mouse moved horizontally
      // or if dragging was already started earlier (it looks weird to stop mid-dragging)
      return deltaX >= 3 * deltaY && sameColumn;
    }
private boolean isDraggingEnabled(@NotNull MouseEvent e)