class PopUpCoachMarkPresenter {

    @PopUpPosition
    protected int getDisplayPosition(Point viewCenterPoint,
                                   @PopUpPosition int defaultPopUpPosition,
                                   CoachMarkPixelInfo coachMarkDimenInPixel) {
        @PopUpPosition
        int correctPosition = 0;
        switch (defaultPopUpPosition) {
            case PopUpPosition.LEFT:
                if (checkIfLeftPossible(viewCenterPoint, coachMarkDimenInPixel)) {
                    correctPosition = defaultPopUpPosition;
                } else {
                    correctPosition = getCorrectPositionOfCoachMarkIfDefaultFails(viewCenterPoint,
                            coachMarkDimenInPixel);
                }
                break;
            case PopUpPosition.RIGHT:
                if (checkIfRightPossible(viewCenterPoint, coachMarkDimenInPixel)) {
                    correctPosition = defaultPopUpPosition;
                } else {
                    correctPosition = getCorrectPositionOfCoachMarkIfDefaultFails(viewCenterPoint,
                            coachMarkDimenInPixel);
                }
                break;

            case PopUpPosition.BOTTOM:
                if (checkIfBottomPossible(viewCenterPoint, coachMarkDimenInPixel)) {
                    correctPosition = defaultPopUpPosition;
                } else {
                    correctPosition = getCorrectPositionOfCoachMarkIfDefaultFails(viewCenterPoint,
                            coachMarkDimenInPixel);
                }
                break;

            case PopUpPosition.TOP:
                if (checkIfTopPossible(viewCenterPoint, coachMarkDimenInPixel)) {
                    correctPosition = defaultPopUpPosition;
                } else {
                    correctPosition = getCorrectPositionOfCoachMarkIfDefaultFails(viewCenterPoint,
                            coachMarkDimenInPixel);
                }
                break;
            case PopUpPosition.NONE:
                //if user selects no position by default check clockwise to find the correct position
                correctPosition = getCorrectPositionOfCoachMarkIfDefaultFails(viewCenterPoint,
                        coachMarkDimenInPixel);
                break;
        }
        return correctPosition;
    }

    public  PopUpCoachMarkPresenter(final IStringResourceProvider stringResourceProvider,
                                   final IDimensionResourceProvider dimensionResourceProvider,
                                   final ITypeFaceProvider typeFaceProvider,
                                   final IScreenInfoProvider screenInfoProvider);

}