public Date getStartDate() {
    switch (getScheduleType()) {
      case RUN_ONCE:
        Date startDate = runOnceEditor.getStartDate();
        String startTime = runOnceEditor.getStartTime();
        String[] times = startTime.split(":"); // $NON-NLS-1$
        int hour = Integer.parseInt(times[0]);
        int minute = Integer.parseInt(times[1]);
        if (startTime.indexOf("PM") >= 0) { // $NON-NLS-1$
          hour += 12;
        }

        startDate.setHours(hour);
        startDate.setMinutes(minute);
        startDate.setSeconds(0);
        return startDate;
      case SECONDS: // fall through
      case MINUTES: // fall through
      case HOURS: // fall through
      case DAILY: // fall through
      case WEEKLY: // fall through
      case MONTHLY: // fall through
      case YEARLY:
        return recurrenceEditor.getStartDate();
      case CRON:
        return cronEditor.getStartDate();
      default:
        throw new RuntimeException(MSGS.invalidRunType(getScheduleType().toString()));
    }
  }
 public Date getEndDate() {
   switch (getScheduleType()) {
     case RUN_ONCE:
       return null;
     case SECONDS: // fall through
     case MINUTES: // fall through
     case HOURS: // fall through
     case DAILY: // fall through
     case WEEKLY: // fall through
     case MONTHLY: // fall through
     case YEARLY:
       return recurrenceEditor.getEndDate();
     case CRON:
       return cronEditor.getEndDate();
     default:
       throw new RuntimeException(MSGS.invalidRunType(getScheduleType().toString()));
   }
 }