String[] minutes = new String[61];
for (int i = 0; i < 60; i++) {
minutes[i] = String.valueOf(i);
}
minutes[60] = "*";
fd.setInputter(new SelectInput(minutes));
fd = type.getFieldDescriptor("Hour");
String[] hours = new String[25];
for (int i = 0; i < 24; i++) {
hours[i] = String.valueOf(i);
}
hours[24] = "*";
fd.setInputter(new SelectInput(hours));
fd = type.getFieldDescriptor("DayOfMonth");
String[] dayOfMonth = new String[34];
int count = 0 ;
for (int i = 1; i < 32; i++) {
dayOfMonth[count++] = String.valueOf(i);
}
dayOfMonth[31] = "L";
dayOfMonth[32] = "*";
dayOfMonth[33] = "?";
fd.setInputter(new SelectInput(dayOfMonth));
fd = type.getFieldDescriptor("Month");
fd.setInputter(new SelectInput(new String[] {
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "*"
}));
fd = type.getFieldDescriptor("DayOfWeek");
fd.setInputter(new SelectInput(new String[] {
"MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN", "MON-FRI", "*", "?"
}));
Calendar c = Calendar.getInstance();
fd = type.getFieldDescriptor("Year");
String[] year = new String[51];
int yearCount = 0;
year[yearCount++] = "*";
for (int i = c.get(Calendar.YEAR); i < c.get(Calendar.YEAR) + 50; i++) {
year[yearCount++] = String.valueOf(i);
}
fd.setInputter(new SelectInput(year));
}