use of org.zkforge.timeline.event.BandScrollEvent in project adempiere by adempiere.
the class WSchedule method onEvent.
public void onEvent(Event event) throws Exception {
if (event instanceof MouseEvent) {
MouseEvent me = (MouseEvent) event;
if (me.getX() > 0) {
MResourceAssignment assignment = new MResourceAssignment(Env.getCtx(), me.getX(), null);
WAssignmentDialog wad = new WAssignmentDialog(assignment, false, infoSchedule.isCreateNew());
if (!wad.isCancelled()) {
_assignmentDialogResult = wad.getMResourceAssignment();
Events.echoEvent("onAssignmentCallback", this, null);
}
}
} else if (event instanceof BandScrollEvent) {
BandScrollEvent e = (BandScrollEvent) event;
Date end = e.getMax();
Date start = e.getMin();
Date mid = e.getCenter();
if (mid != null) {
m_center = mid;
infoSchedule.dateCallback(mid);
}
}
}
Aggregations