* @return a <code>ScheduleOccurrence</code> object, the properties of which are determined by
* the current values of this panel's input fields; or <code>null</code> if the
* current input fields has invalid values.
*/
public ScheduleOccurrence getOccurrence() {
ScheduleOccurrence occ = new ScheduleOccurrence();
int type = typeSelectionPanel.getSelectedType();
if (type == ScheduleOccurrence.DAILY) {
occ.setDailyOccurrence(every_X_days_panel.getValue());
} else if (type == ScheduleOccurrence.WEEKLY) {
occ.setWeeklyOccurrence(every_X_weeks_panel.getValue(), dayOfTheWeekCheckBoxPanel.getSelectedDays());
} else if (type == ScheduleOccurrence.MONTHLY) {
if (monthlyPanel.getMonthlyType() == 0) {
occ.setMonthlyOccurrence(monthly_A_panel.getDay(), monthly_A_panel.getMonth());
} else {
occ.setMonthlyOccurence(monthly_B_panel.getDayNum(), monthly_B_panel.getDay(), monthly_B_panel
.get_Every_X_Month());
}
}
return occ;
}