@Test public void isDisabled() { Element elementMock = mock(Element.class); when(elementMock.getClassName()).thenReturn(Styles.DISABLED); assertTrue(baseMenu.isDisabled(elementMock)); when(elementMock.getClassName()).thenReturn(Styles.DROPDOWN_MENU); assertFalse(baseMenu.isDisabled(elementMock)); }
@Override public boolean isDisabled(final Element element) { final List<String> classNames = Arrays.asList(element.getClassName().split("\\s")); return classNames.contains(Styles.DISABLED); }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public boolean isDisabled(final Element element) { final List<String> classNames = Arrays.asList(element.getClassName().split("\\s")); return classNames.contains(Styles.DISABLED); } }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public boolean isDisabled(final Element element) { final List<String> classNames = Arrays.asList(element.getClassName().split("\\s")); return classNames.contains(Styles.DISABLED); }  }
BaseMenu implements IsWidget,
                                          BaseMenuView.BaseMenuPresenter { @Override public boolean isDisabled(final Element element) { final List<String> classNames = Arrays.asList(element.getClassName().split("\\s")); return classNames.contains(Styles.DISABLED); }  @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 boolean isDisabled(final Element element) { final List<String> classNames = Arrays.asList(element.getClassName().split("\\s")); return classNames.contains(Styles.DISABLED); }  @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);  }