@MagicConstant(intValues = {CENTER, TOP, LEFT, BOTTOM, RIGHT, -1})
  public static int getDropSideFor(Point point, JComponent component) {
    double r = Math.max(.05, Math.min(.45, Registry.doubleValue("ide.tabbedPane.dragToSplitRatio")));

    Rectangle rect = new Rectangle(new Point(0, 0), component.getSize());
    double width = rect.getWidth();
    double height = rect.getHeight();
    GeneralPath topShape = new GeneralPath();
    topShape.moveTo(0, 0);
    topShape.lineTo(width, 0);
    topShape.lineTo(width * (1 - r), height * r);
    topShape.lineTo(width  * r, height  * r);
    topShape.closePath();

    GeneralPath leftShape = new GeneralPath();
    leftShape.moveTo(0, 0);
    leftShape.lineTo(width  * r, height  * r);
    leftShape.lineTo(width  * r, height * (1 - r));
    leftShape.lineTo(0, height);
    leftShape.closePath();

    GeneralPath bottomShape = new GeneralPath();
    bottomShape.moveTo(0, height);
    bottomShape.lineTo(width  * r, height * (1 - r));
    bottomShape.lineTo(width * (1 - r), height * (1 - r));
    bottomShape.lineTo(width, height);
    bottomShape.closePath();

    GeneralPath rightShape = new GeneralPath();
    rightShape.moveTo(width, 0);
    rightShape.lineTo(width * (1 - r), height  * r);
    rightShape.lineTo(width * (1 - r), height * (1 - r));
    rightShape.lineTo(width, height);
    rightShape.closePath();

    if (rightShape.contains(point)) return RIGHT;
    if (leftShape.contains(point)) return LEFT;
    if (bottomShape.contains(point)) return BOTTOM;
    if (topShape.contains(point)) return TOP;
    return rect.contains(point) ? CENTER : -1;
  }
@MagicConstant(intValues = {CENTER, TOP, LEFT, BOTTOM, RIGHT, -1})
  public static int getDropSideFor(Point point, JComponent component)