* Adds a new item to the toolbar, handling its placement in both the toplevel
* and overflow toolbars.
*/
private Item insertItem(int beforeIndex) {
// The widget for the toplevel toolbar.
HorizontalToolbarButtonWidget toplevelButton = new HorizontalToolbarButtonWidget();
self.insert(toplevelButton, beforeIndex);
overflowLogic.updateStateEventually();
// The widget for the overflow toolbar. Construct manually and use
// hackAddWidget so that the ToolbarButtonViewProxy can manage the state