@Override
  public int getDropIndexFor(Point point) {
    if (lastSingRowLayout == null) return -1;

    int result = -1;

    Component c = tabs.getComponentAt(point);

    if (c instanceof JBTabsImpl) {
      for (int i = 0; i < lastSingRowLayout.visibleInfos.size() - 1; i++) {
        TabLabel first = tabs.getTabLabel(lastSingRowLayout.visibleInfos.get(i));
        TabLabel second = tabs.getTabLabel(lastSingRowLayout.visibleInfos.get(i + 1));

        Rectangle firstBounds = Objects.requireNonNull(first).getBounds();
        Rectangle secondBounds = Objects.requireNonNull(second).getBounds();

        final boolean between;

        boolean horizontal = getStrategy() instanceof SingleRowLayoutStrategy.Horizontal;
        if (horizontal) {
          between = firstBounds.getMaxX() < point.x
                    && secondBounds.getX() > point.x
                    && firstBounds.y < point.y
                    && secondBounds.getMaxY() > point.y;
        } else {
          between = firstBounds.getMaxY() < point.y
                    && secondBounds.getY() > point.y
                    && firstBounds.x < point.x
                    && secondBounds.getMaxX() > point.x;
        }

        if (between) {
          c = first;
          break;
        }
      }

    }

    if (c instanceof TabLabel) {
      TabInfo info = ((TabLabel)c).getInfo();
      int index = lastSingRowLayout.visibleInfos.indexOf(info);
      boolean isDropTarget = tabs.isDropTarget(info);
      if (!isDropTarget) {
        for (int i = 0; i <= index; i++) {
          if (tabs.isDropTarget(lastSingRowLayout.visibleInfos.get(i))) {
            index -= 1;
            break;
          }
        }
        result = index;
      } else if (index < lastSingRowLayout.visibleInfos.size()) {
        result = index;
      }
    }

    return result;
  }
@Override
  public int getDropIndexFor(Point point)