@Test public void addComponentItem_delegateToMenuManager() { TestContextMenu menu = new TestContextMenu(); Component component = Mockito.mock(Component.class); menu.addItem(component, null); Mockito.verify(menuManager).addItem(component); }
@Override public GridMenuItem<T> addItem(String text, ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener) { GridMenuItem<T> menuItem = addItem(text); if (clickListener != null) { menuItem.addMenuItemClickListener(clickListener); } return menuItem; }
GridSubMenu extends SubMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public GridMenuItem<T> addItem(String text, ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener) { GridMenuItem<T> menuItem = addItem(text); if (clickListener != null) { menuItem.addMenuItemClickListener(clickListener); } return menuItem; } }
GridSubMenu extends SubMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public GridMenuItem<T> addItem(String text, ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener) { GridMenuItem<T> menuItem = addItem(text); if (clickListener != null) { menuItem.addMenuItemClickListener(clickListener); } return menuItem; } GridSubMenu(GridMenuItem<T> parentMenuItem,
            SerializableRunnable contentReset); }
GridSubMenu extends SubMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public GridMenuItem<T> addItem(String text, ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener) { GridMenuItem<T> menuItem = addItem(text); if (clickListener != null) { menuItem.addMenuItemClickListener(clickListener); } return menuItem; } GridSubMenu(GridMenuItem<T> parentMenuItem,
            SerializableRunnable contentReset); @Override GridMenuItem<T> addItem(String text,
            ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener); @Override GridMenuItem<T> addItem(Component component,
            ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener); }
GridSubMenu extends SubMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public GridMenuItem<T> addItem(String text, ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener) { GridMenuItem<T> menuItem = addItem(text); if (clickListener != null) { menuItem.addMenuItemClickListener(clickListener); } return menuItem; } GridSubMenu(GridMenuItem<T> parentMenuItem,
            SerializableRunnable contentReset); @Override GridMenuItem<T> addItem(String text,
            ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener); @Override GridMenuItem<T> addItem(Component component,
            ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener);  }