class BasicMonthViewUI extends MonthViewUI {

    protected Point getDayGridPositionAtLocation(int x, int y) {
        Rectangle monthDetailsBounds = getMonthDetailsBoundsAtLocation(x, y);
        if ((monthDetailsBounds == null) || (!monthDetailsBounds.contains(x, y)))
            return null;
        int calendarRow = (y - monthDetailsBounds.y) / fullBoxHeight + DAY_HEADER_ROW;
        int absoluteColumn = (x - monthDetailsBounds.x) / fullBoxWidth;
        int calendarColumn = absoluteColumn + FIRST_DAY_COLUMN;
        if (!isLeftToRight) {
            int leading = monthDetailsBounds.x + monthDetailsBounds.width;
            calendarColumn = (leading - x) / fullBoxWidth + FIRST_DAY_COLUMN;
        }
        if (monthView.isShowingWeekNumber()) {
            calendarColumn -= 1;
        }
        return new Point(calendarColumn, calendarRow);
    }

}