public void reset(Date d) {

    startTimePicker.setHour("12"); // $NON-NLS-1$
    startTimePicker.setMinute("00"); // $NON-NLS-1$
    startTimePicker.setTimeOfDay(TimeUtil.TimeOfDay.AM);

    dateRangeEditor.reset(d);

    secondlyEditor.reset();
    minutelyEditor.reset();
    hourlyEditor.reset();
    dailyEditor.reset();
    weeklyEditor.reset();
    monthlyEditor.reset();
    yearlyEditor.reset();
  }
  private void configureOnChangeHandler() {
    final RecurrenceEditor localThis = this;

    ICallback<IChangeHandler> handler =
        new ICallback<IChangeHandler>() {
          public void onHandle(IChangeHandler o) {
            localThis.changeHandler();
          }
        };

    startTimePicker.setOnChangeHandler(handler);
    dateRangeEditor.setOnChangeHandler(handler);

    secondlyEditor.setOnChangeHandler(handler);
    minutelyEditor.setOnChangeHandler(handler);
    hourlyEditor.setOnChangeHandler(handler);
    dailyEditor.setOnChangeHandler(handler);
    weeklyEditor.setOnChangeHandler(handler);
    monthlyEditor.setOnChangeHandler(handler);
    yearlyEditor.setOnChangeHandler(handler);
  }
 /**
  * @return null if the selected schedule does not support repeat-in-seconds, otherwise return the
  *     number of seconds between schedule execution.
  * @throws RuntimeException if the temporal value (tv) is invalid. This condition occurs as a
  *     result of programmer error.
  */
 public Long getRepeatInSecs() throws RuntimeException {
   switch (temporalState) {
     case WEEKLY:
       // fall through
     case MONTHLY:
       // fall through
     case YEARLY:
       return null;
     case SECONDS:
       return Long.parseLong(secondlyEditor.getValue());
     case MINUTES:
       return TimeUtil.minutesToSecs(Long.parseLong(minutelyEditor.getValue()));
     case HOURS:
       return TimeUtil.hoursToSecs(Long.parseLong(hourlyEditor.getValue()));
     case DAILY:
       return TimeUtil.daysToSecs(Long.parseLong(dailyEditor.getRepeatValue()));
     default:
       throw new RuntimeException(
           Messages.getString(
               "schedule.invalidTemporalValueInGetRepeatInSecs", temporalState.toString()));
   }
 }