}
@Override
public Object getValueAt(int rowIndex, int col) {
try {
SheduleReceptionData data = datas.get(rowIndex);
if (col == COL_TIME) {
Calendar tb = GregorianCalendar.getInstance();
Calendar te = GregorianCalendar.getInstance();
tb.setTime(data.getBegin());
te.setTime(data.getEnd());
return String.format("%02d:%02d-%02d:%02d", tb.get(Calendar.HOUR_OF_DAY),
tb.get(Calendar.MINUTE), te.get(Calendar.HOUR_OF_DAY), te.get(Calendar.MINUTE));
}
else if (col == COL_CLIENT) {
return data.getClient(null).toString();
}
else if (col == COL_DUTY){
String services = "";
List<Integer> srl = data.getLinkedServicesList();
List<SerRenLocal> clientServices = data.getClient(null).getSerRenListToRender();
for (int i = 0; i < clientServices.size(); i++) {
SerRenLocal s = clientServices.get(i);
if (srl.contains(s.getID())) {
services += " - " + s.getService().getTitle() + "\n";