private TimeTrackerComponent timeTrackerForResourcesLoadPanel(
TimeTracker timeTracker) {
return new TimeTrackerComponent(timeTracker) {
@Override
protected void scrollHorizontalPercentage(int daysDisplacement) {
response("", new AuInvoke(resourceLoadList,
"scroll_horizontal", daysDisplacement + ""));
moveCurrentPositionScroll();
}
@Override
protected void moveCurrentPositionScroll() {
// get the previous data.
LocalDate previousStart = getPreviousStart();
// get the current data
int diffDays = getTimeTrackerComponent().getDiffDays(
previousStart);
double pixelPerDay = getTimeTrackerComponent().getPixelPerDay();
response("move_scroll", new AuInvoke(resourceLoadList,
"move_scroll", "" + diffDays, "" + pixelPerDay));
}
protected void updateCurrentDayScroll() {
double previousPixelPerDay = getTimeTracker().getMapper()
.getPixelsPerDay().doubleValue();
response("update_day_scroll", new AuInvoke(resourceLoadList,
"update_day_scroll", "" + previousPixelPerDay));
}
};
}