public boolean isMovingForward(@NotNull RelativePoint target) {
    try {
      if (component == null || !component.isShowing()) return false;
      if (myPrevMousePoint == null) return true;
      if (myPrevMousePoint.getComponent() != target.getComponent()) return false;
      Rectangle rectangleOnScreen = new Rectangle(component.getLocationOnScreen(), component.getSize());
      return ScreenUtil.isMovementTowards(myPrevMousePoint.getScreenPoint(), target.getScreenPoint(), rectangleOnScreen);
    }
    finally {
      myPrevMousePoint = target;
    }
  }
public boolean isMovingForward(@NotNull RelativePoint target)