overflowLogic.updateStateEventually();
// The widget for the overflow toolbar. Construct manually and use
// hackAddWidget so that the ToolbarButtonViewProxy can manage the state
// of the submenus correctly.
VerticalToolbarButtonWidget overflowButton = new VerticalToolbarButtonWidget();
overflowSubmenu.hackInsertWidget(overflowButton, beforeIndex);
// Return the item, initially proxying the toplevel button.
Item item = new Item(toplevelButton, overflowButton, new ToolbarButtonUiProxy(toplevelButton));
items.add(beforeIndex, item);