}
private void processAppoint(int row, int col, String appointName, String memo) {
MedicalEvent entry = days[row][col];
AppointmentModel appoint = entry.getAppointEntry();
if (appoint == null) {
appoint = new AppointmentModel();
appoint.setDate(ModelUtils.getDateAsObject(entry.getDisplayDate()));
entry.setAppointEntry(appoint);
}
int oldState = appoint.getState();
int next = 0;
switch (oldState) {
case AppointmentModel.TT_NONE:
next = AppointmentModel.TT_NEW;
break;
case AppointmentModel.TT_NEW:
next = AppointmentModel.TT_NEW;
break;
case AppointmentModel.TT_HAS:
next = AppointmentModel.TT_REPLACE;
break;
case AppointmentModel.TT_REPLACE:
next = AppointmentModel.TT_REPLACE;
break;
}
appoint.setState(next);
appoint.setName(appointName);
appoint.setMemo(memo);
((AbstractTableModel)table.getModel()).fireTableCellUpdated(popedRow, popedCol);
boundSupport.firePropertyChange(CareMapDocument.APPOINT_PROP, null, appoint);