@Test public void hide() { when(rootPanelMock.getWidgetIndex(viewMock)).thenReturn(1); baseMenu.hide(); verify(baseMenu, times(1)).isShown(); verify(styleMock, times(1)).setDisplay(Style.Display.NONE); when(rootPanelMock.getWidgetIndex(viewMock)).thenReturn(-1); reset(baseMenu); reset(styleMock); baseMenu.hide(); verify(baseMenu, times(1)).isShown(); verify(styleMock, times(0)).setDisplay(Style.Display.NONE); }
@Override public void hide() { if (isShown()) { getRootPanel().remove(this); view.getContextMenuDropdown().getStyle().setDisplay(Style.Display.NONE); } }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public void hide() { if (isShown()) { getRootPanel().remove(this); view.getContextMenuDropdown().getStyle().setDisplay(Style.Display.NONE); } } }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public void hide() { if (isShown()) { getRootPanel().remove(this); view.getContextMenuDropdown().getStyle().setDisplay(Style.Display.NONE); } }  }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public void hide() { if (isShown()) { getRootPanel().remove(this); view.getContextMenuDropdown().getStyle().setDisplay(Style.Display.NONE); } }  @PostConstruct @Override void initialise(); @Override LIElement addMenuItem(String id, String label, String i18n); @Override LIElement addExecutableMenuItem(String id, String label, String i18n, Event event); @Override LIElement addExecutableMenuItem(String id, String label, String i18n); @Override LIElement addExecutableMenuItemAfter(String id, String label, String i18n, LIElement previous); @Override void removeMenuItem(LIElement toRemove); @Override void mapEvent(LIElement executableMenuItem, Event toBeMapped); @Override Widget asWidget(); @Override void show(final int mx, final int my); @Override void hide(); @Override boolean isShown(); @Override BaseMenuView getView(); @Override void enableElement(Element element, boolean enabled); @Override boolean isDisabled(final Element element); @Override void onContextMenuEvent(ContextMenuEvent event); }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public void hide() { if (isShown()) { getRootPanel().remove(this); view.getContextMenuDropdown().getStyle().setDisplay(Style.Display.NONE); } }  @PostConstruct @Override void initialise(); @Override LIElement addMenuItem(String id, String label, String i18n); @Override LIElement addExecutableMenuItem(String id, String label, String i18n, Event event); @Override LIElement addExecutableMenuItem(String id, String label, String i18n); @Override LIElement addExecutableMenuItemAfter(String id, String label, String i18n, LIElement previous); @Override void removeMenuItem(LIElement toRemove); @Override void mapEvent(LIElement executableMenuItem, Event toBeMapped); @Override Widget asWidget(); @Override void show(final int mx, final int my); @Override void hide(); @Override boolean isShown(); @Override BaseMenuView getView(); @Override void enableElement(Element element, boolean enabled); @Override boolean isDisabled(final Element element); @Override void onContextMenuEvent(ContextMenuEvent event);  }