@Test public void testRegisterOnCloseHandler() { final EventListener<Event> onKeyDown = (e) -> {}; doReturn(onKeyDown).when(view).onKeyDown(); view.registerOnCloseHandler(); verify(viewElement).addEventListener(KEYDOWN, onKeyDown, false); }
void registerOnCloseHandler() { getElement().addEventListener(KEYDOWN, onKeyDown(), false); }
ListSelectorViewImpl implements ListSelectorView { void registerOnCloseHandler() { getElement().addEventListener(KEYDOWN, onKeyDown(), false); } }
ListSelectorViewImpl implements ListSelectorView { void registerOnCloseHandler() { getElement().addEventListener(KEYDOWN, onKeyDown(), false); } ListSelectorViewImpl(); @Inject  ListSelectorViewImpl(final UnorderedList itemsContainer,
                                final ManagedInstance<ListSelectorTextItemView> listSelectorTextItemViews,
                                final ManagedInstance<ListSelectorDividerItemView> listSelectorDividerItemViews,
                                final ManagedInstance<ListSelectorHeaderItemView> listSelectorHeaderItemViews); }
ListSelectorViewImpl implements ListSelectorView { void registerOnCloseHandler() { getElement().addEventListener(KEYDOWN, onKeyDown(), false); } ListSelectorViewImpl(); @Inject  ListSelectorViewImpl(final UnorderedList itemsContainer,
                                final ManagedInstance<ListSelectorTextItemView> listSelectorTextItemViews,
                                final ManagedInstance<ListSelectorDividerItemView> listSelectorDividerItemViews,
                                final ManagedInstance<ListSelectorHeaderItemView> listSelectorHeaderItemViews); @Override void init(final Presenter presenter); @Override void setItems(final List<ListSelectorItem> items); @Override void show(final Optional<String> title); @Override void hide(); @Override void setOnClosedByKeyboardCallback(final Consumer<CanBeClosedByKeyboard> callback); }
ListSelectorViewImpl implements ListSelectorView { void registerOnCloseHandler() { getElement().addEventListener(KEYDOWN, onKeyDown(), false); } ListSelectorViewImpl(); @Inject  ListSelectorViewImpl(final UnorderedList itemsContainer,
                                final ManagedInstance<ListSelectorTextItemView> listSelectorTextItemViews,
                                final ManagedInstance<ListSelectorDividerItemView> listSelectorDividerItemViews,
                                final ManagedInstance<ListSelectorHeaderItemView> listSelectorHeaderItemViews); @Override void init(final Presenter presenter); @Override void setItems(final List<ListSelectorItem> items); @Override void show(final Optional<String> title); @Override void hide(); @Override void setOnClosedByKeyboardCallback(final Consumer<CanBeClosedByKeyboard> callback);  }