public ListBoxItem(String name, String title) { super(name, title); listBox = new ListBox(); listBox.setName(name); listBox.setTitle(title); listBox.setVisibleItemCount(5); listBox.setTabIndex(0); listBox.setHeight("50px"); valueChangeHandler = new ChangeHandler() { @Override public void onChange(ChangeEvent event) {} }; listBox.addChangeHandler(valueChangeHandler); wrapper = new HorizontalPanel(); wrapper.add(listBox); }
@Test public void checkTabIndex() { ListBox listBox = new ListBox(false); listBox.setTabIndex(2); Assert.assertEquals(2, listBox.getTabIndex()); }