public Action[] getActions() {
if (widget instanceof SimpleDayCell) {
/*
* Month view
*/
SimpleDayCell cell = (SimpleDayCell) widget;
Date start = new Date(cell.getDate().getYear(),
cell.getDate().getMonth(), cell.getDate()
.getDate(), 0, 0, 0);
Date end = new Date(cell.getDate().getYear(), cell
.getDate().getMonth(), cell.getDate()
.getDate(), 23, 59, 59);
return CalendarConnector.this.getActionsBetween(
start, end);
} else if (widget instanceof MonthEventLabel) {
MonthEventLabel mel = (MonthEventLabel) widget;
CalendarEvent event = mel.getCalendarEvent();
Action[] actions = CalendarConnector.this
.getActionsBetween(event.getStartTime(),
event.getEndTime());
for (Action action : actions) {
((VCalendarAction) action).setEvent(event);
}
return actions;
} else if (widget instanceof DateCell) {
/*
* Week and Day view
*/
DateCell cell = (DateCell) widget;
int slotIndex = DOM.getChildIndex(
cell.getElement(), (Element) ne
.getEventTarget().cast());
DateCellSlot slot = cell.getSlot(slotIndex);
return CalendarConnector.this.getActionsBetween(
slot.getFrom(), slot.getTo());
} else if (widget instanceof DateCellDayEvent) {
/*
* Context menu on event