@Override
public void onBrowserEvent(Event event) {
switch (DOM.eventGetType(event)) {
case Event.ONCLICK: {
Cell cell = getCell(event);
if (cell != null) {
cell.onClick(event);
}
break;
}
case Event.ONMOUSEOUT: {
Element e = DOM.eventGetFromElement(event);
if (e != null) {
Cell cell = cellMap.get(e);
if (cell != null) {
cell.removeStyleName(Styles.HIGHLIGHTED_CELL);
Element target = DOM.eventGetToElement(event);
if (target != null && cellMap.get(target) == null) {
updateHighlightedDate(null);
}
}
}
break;
}
case Event.ONMOUSEOVER: {
Element e = DOM.eventGetToElement(event);
if (e != null) {
Cell cell = cellMap.get(e);
if (cell != null) {
cell.addStyleName(Styles.HIGHLIGHTED_CELL);
cell.onHover();
}
}
break;
}
}