| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.content.browser.input; | 5 package org.chromium.ui.picker; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 | 8 |
| 9 import org.chromium.content.R; | 9 import org.chromium.ui.R; |
| 10 | 10 |
| 11 public class MonthPickerDialog extends TwoFieldDatePickerDialog { | 11 public class MonthPickerDialog extends TwoFieldDatePickerDialog { |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * @param context The context the dialog is to run in. | 14 * @param context The context the dialog is to run in. |
| 15 * @param callBack How the parent is notified that the date is set. | 15 * @param callBack How the parent is notified that the date is set. |
| 16 * @param year The initial year of the dialog. | 16 * @param year The initial year of the dialog. |
| 17 * @param monthOfYear The initial month of the dialog. | 17 * @param monthOfYear The initial month of the dialog. |
| 18 */ | 18 */ |
| 19 public MonthPickerDialog(Context context, OnValueSetListener callBack, | 19 public MonthPickerDialog(Context context, OnValueSetListener callBack, |
| 20 int year, int monthOfYear, double minMonth, double maxMonth) { | 20 int year, int monthOfYear, double minMonth, double maxMonth) { |
| 21 super(context, callBack, year, monthOfYear, minMonth, maxMonth); | 21 super(context, callBack, year, monthOfYear, minMonth, maxMonth); |
| 22 setTitle(R.string.month_picker_dialog_title); | 22 setTitle(R.string.month_picker_dialog_title); |
| 23 } | 23 } |
| 24 | 24 |
| 25 @Override | 25 @Override |
| 26 protected TwoFieldDatePicker createPicker(Context context, double minValue,
double maxValue) { | 26 protected TwoFieldDatePicker createPicker(Context context, double minValue,
double maxValue) { |
| 27 return new MonthPicker(context, minValue, maxValue); | 27 return new MonthPicker(context, minValue, maxValue); |
| 28 } | 28 } |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Gets the {@link MonthPicker} contained in this dialog. | 31 * Gets the {@link MonthPicker} contained in this dialog. |
| 32 * | 32 * |
| 33 * @return The calendar view. | 33 * @return The calendar view. |
| 34 */ | 34 */ |
| 35 public MonthPicker getMonthPicker() { | 35 public MonthPicker getMonthPicker() { |
| 36 return (MonthPicker) mPicker; | 36 return (MonthPicker) mPicker; |
| 37 } | 37 } |
| 38 } | 38 } |
| OLD | NEW |