EMMA Coverage Report (generated Fri Aug 23 16:39:17 PDT 2013)
[all classes][org.chromium.content.browser.input]

COVERAGE SUMMARY FOR SOURCE FILE [WeekPickerDialog.java]

nameclass, %method, %block, %line, %
WeekPickerDialog.java0%   (0/1)0%   (0/5)0%   (0/50)0%   (0/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class WeekPickerDialog0%   (0/1)0%   (0/5)0%   (0/50)0%   (0/12)
WeekPickerDialog (Context, TwoFieldDatePickerDialog$OnValueSetListener, int, ... 0%   (0/1)0%   (0/10)0%   (0/2)
WeekPickerDialog (Context, int, TwoFieldDatePickerDialog$OnValueSetListener, ... 0%   (0/1)0%   (0/13)0%   (0/3)
createPicker (Context, long, long): TwoFieldDatePicker 0%   (0/1)0%   (0/7)0%   (0/1)
getWeekPicker (): WeekPicker 0%   (0/1)0%   (0/4)0%   (0/1)
tryNotifyDateSet (): void 0%   (0/1)0%   (0/16)0%   (0/5)

1// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4 
5package org.chromium.content.browser.input;
6 
7import android.content.Context;
8 
9import org.chromium.content.R;
10 
11public class WeekPickerDialog extends TwoFieldDatePickerDialog {
12 
13    /**
14     * @param context The context the dialog is to run in.
15     * @param callBack How the parent is notified that the date is set.
16     * @param year The initial year of the dialog.
17     * @param weekOfYear The initial week of the dialog.
18     */
19    public WeekPickerDialog(Context context,
20             OnValueSetListener callBack,
21            int year, int weekOfYear,
22            long minValue, long maxValue) {
23        this(context, 0, callBack, year, weekOfYear, minValue, maxValue);
24    }
25 
26    /**
27     * @param context The context the dialog is to run in.
28     * @param theme the theme to apply to this dialog
29     * @param callBack How the parent is notified that the date is set.
30     * @param year The initial year of the dialog.
31     * @param weekOfYear The initial week of the dialog.
32     */
33    public WeekPickerDialog(Context context,
34            int theme,
35             OnValueSetListener callBack,
36            int year,
37            int weekOfYear,
38            long minValue, long maxValue) {
39        super(context, theme, callBack, year, weekOfYear, minValue, maxValue);
40        setTitle(R.string.week_picker_dialog_title);
41    }
42 
43    @Override
44    protected TwoFieldDatePicker createPicker(Context context, long minValue, long maxValue) {
45        return new WeekPicker(context, minValue, maxValue);
46    }
47 
48    @Override
49    protected void tryNotifyDateSet() {
50        if (mCallBack != null) {
51            WeekPicker picker = getWeekPicker();
52            picker.clearFocus();
53            mCallBack.onValueSet(picker.getYear(), picker.getWeek());
54        }
55    }
56 
57    /**
58     * Gets the {@link WeekPicker} contained in this dialog.
59     *
60     * @return The calendar view.
61     */
62    public WeekPicker getWeekPicker() {
63        return (WeekPicker) mPicker;
64    }
65}

[all classes][org.chromium.content.browser.input]
EMMA 2.0.5312 (C) Vladimir Roubtsov