}
});
}
private void appendHoursStartAndFinish(final Row row) {
final WorkReportLine line = (WorkReportLine) row.getValue();
final Timebox timeStart = getNewTimebox();
final Timebox timeFinish = getNewTimebox();
row.appendChild(timeStart);
row.appendChild(timeFinish);
Util.bind(timeStart, new Util.Getter<Date>() {
@Override
public Date get() {
if ((line != null) && (line.getClockStart() != null)) {
return line.getClockStart().toDateTimeToday().toDate();
}
return null;
}
}, new Util.Setter<Date>() {
@Override
public void set(Date value) {
if (line != null) {
checkCannotBeHigher(timeStart, timeFinish);
setClock(line, timeStart, timeFinish);
updateEffort(row);
}
}
});
Util.bind(timeFinish, new Util.Getter<Date>() {
@Override
public Date get() {
if ((line != null) && (line.getClockStart() != null)) {
return line.getClockFinish().toDateTimeToday().toDate();
}
return null;
}
}, new Util.Setter<Date>() {