if (resizeController == null) {
resizeController = new DayViewResizeController(dayViewBody.getGrid().grid);
resizeController.addDragHandler(new DragHandler(){
public void onDragEnd(DragEndEvent event) {
Appointment appt = ((AppointmentWidget) event.getContext().draggable.getParent()).getAppointment();
calendarWidget.setCommittedAppointment(appt);
calendarWidget.fireUpdateEvent(appt);
}
public void onDragStart(DragStartEvent event) {
calendarWidget
.setRollbackAppointment(((AppointmentWidget) event
.getContext().draggable.getParent()).getAppointment()
.clone());
}
public void onPreviewDragEnd(DragEndEvent event)
throws VetoDragException {}
public void onPreviewDragStart(DragStartEvent event)
throws VetoDragException {}
});
}
if(proxyResizeController == null) {
proxyResizeController = new DayViewResizeController(dayViewBody.getGrid().grid);
proxyResizeController.addDragHandler(new DragHandler(){
long startTime = 0L;
int initialX = 0;
int initialY = 0;
Date startDate;
public void onDragEnd(DragEndEvent event) {
long clickTime = System.currentTimeMillis() - startTime;
int y = event.getContext().mouseY;
if (clickTime <= 500 && initialY == y) {
calendarWidget.fireTimeBlockClickEvent(startDate);
} else {
Appointment appt = ((AppointmentWidget) event.getContext().draggable.getParent()).getAppointment();
calendarWidget.fireCreateEvent(appt);
}
}
public void onDragStart(DragStartEvent event) {