private boolean checkParentContains(Point p) {
    if (outerParentArea == null)
      return component.getParent().contains(p);

    Point p2 = SwingUtilities.convertPoint(component.getParent(), p, outerParentArea);
    if (detectOuterAreaAsLine) {
      Insets i = new Insets(0, 0, 0, 0);//outerParentArea.getInsets();
      return component.getParent().contains(p)
      ||
      (outerParentArea.contains(p2) &&
          (isVerticalDrag()
              ?
               (p2.getX() >= i.left && p2.getX() < (outerParentArea.getWidth() - i.right))
               :
                 (p2.getY() >= i.top && p2.getY() < (outerParentArea.getHeight() - i.bottom))));
    }

    return component.getParent().contains(p) || outerParentArea.contains(p2);
  }