}
}
protected void onClick(Event event) {
event.preventDefault();
XElement target = event.getEventTarget().cast();
XElement pn = null;
if ((pn = target.findParent(appearance.daySelector(), 2)) != null) {
event.preventDefault();
onDayClick(pn);
} else if ((pn = target.findParent(appearance.leftMonthSelector(), 1)) != null) {
showPrevMonth();
} else if ((pn = target.findParent(appearance.rightMonthSelector(), 1)) != null) {
showNextMonth();
} else if ((pn = target.findParent(appearance.monthButtonSelector(), 5)) != null) {
showMonthPicker();
}
if ((pn = target.findParent(appearance.monthPickerMonthSelector(), 2)) != null) {
for (int i = 0; i < mpMonths.getCount(); i++) {
appearance.onMonthSelected(mpMonths.getElement(i), false);
}
appearance.onMonthSelected(pn, true);
mpSelMonth = pn.getPropertyInt("xmonth");
} else if ((pn = target.findParent(appearance.monthPickerYearSelector(), 2)) != null) {
for (int i = 0; i < mpYears.getCount(); i++) {
appearance.onMonthSelected(mpYears.getElement(i), false);
}
appearance.onMonthSelected(pn, true);
mpSelYear = pn.getPropertyInt("xyear");
} else if (target.is(appearance.monthPickerOkSelector())) {
DateWrapper d = new DateWrapper(mpSelYear, mpSelMonth, 1);
update(d);
hideMonthPicker();
} else if (target.is(appearance.monthPickerCancelSelector())) {