}
});
capacityPicker.setDisabled(baseCalendarModel.isDerived()
&& baseCalendarModel.isDefault(day));
Listcell inheritedListcell = new Listcell();
if (baseCalendarModel.isDerived()) {
Checkbox inheritedCheckbox = Util.bind(new Checkbox(),
new Util.Getter<Boolean>() {
@Override
public Boolean get() {
return baseCalendarModel.isDefault(day);
}
}, new Util.Setter<Boolean>() {
@Override
public void set(Boolean value) {
if (value) {
baseCalendarModel.setDefault(day);
} else {
baseCalendarModel.unsetDefault(day);
}
}
});
inheritedCheckbox.addEventListener(Events.ON_CHECK,
new EventListener() {
@Override
public void onEvent(Event event) {
reloadCurrentWindow();
}
});
inheritedListcell.appendChild(inheritedCheckbox);
}
item.appendChild(inheritedListcell);
}