menu = new Menu();
beforeItem = new CheckMenuItem();
beforeItem.addCheckChangeHandler(handler);
beforeMenu = new DateMenu();
beforeMenu.addValueChangeHandler(handler);
beforeItem.setSubMenu(beforeMenu);
menu.add(beforeItem);
afterItem = new CheckMenuItem();
afterItem.addCheckChangeHandler(handler);
afterMenu = new DateMenu();
afterMenu.addValueChangeHandler(handler);
afterItem.setSubMenu(afterMenu);
menu.add(afterItem);
menu.add(new SeparatorMenuItem());
onItem = new CheckMenuItem();
onItem.addCheckChangeHandler(handler);
onMenu = new DateMenu();
onMenu.addValueChangeHandler(handler);
onItem.setSubMenu(onMenu);
menu.add(onItem);
setMessages(getMessages());