@Test public void testChangeList() { final BasicEventList<String> source = new BasicEventList<>(); final Combo combo = new Combo(getShell(), SWT.DROP_DOWN); final DefaultEventComboViewer<String> viewer = new DefaultEventComboViewer<>(source, combo); assertSame(combo, viewer.getCombo()); source.addAll(GlazedListsTests.delimitedStringToList("A B C D E F")); assertEquals(source.size(), combo.getItemCount()); assertTrue(Arrays.equals(source.toArray(new String[source.size()]), combo.getItems())); source.clear(); assertEquals(0, combo.getItemCount()); assertTrue(Arrays.equals(new String[0], combo.getItems())); source.add("B"); source.add("D"); source.add(0, "A"); source.add(2, "C"); assertEquals(GlazedListsTests.delimitedStringToList("A B C D"), source); assertEquals(source.size(), combo.getItemCount()); assertTrue(Arrays.equals(source.toArray(new String[source.size()]), combo.getItems())); source.addAll(GlazedListsTests.delimitedStringToList("E F")); source.removeAll(GlazedListsTests.delimitedStringToList("A B")); assertEquals(GlazedListsTests.delimitedStringToList("C D E F"), source); assertEquals(source.size(), combo.getItemCount()); assertTrue(Arrays.equals(source.toArray(new String[source.size()]), combo.getItems())); source.remove(0); source.remove("E"); assertEquals(GlazedListsTests.delimitedStringToList("D F"), source); assertEquals(source.size(), combo.getItemCount()); assertTrue(Arrays.equals(source.toArray(new String[source.size()]), combo.getItems())); }
public Combo getCombo() { return combo; }
DefaultEventComboViewer implements ListEventListener<E> { public Combo getCombo() { return combo; } }
DefaultEventComboViewer implements ListEventListener<E> { public Combo getCombo() { return combo; } DefaultEventComboViewer(EventList<E> source, Combo combo);  DefaultEventComboViewer(EventList<E> source, Combo combo, ItemFormat<? super E> itemFormat); protected  DefaultEventComboViewer(EventList<E> source, Combo combo,
			ItemFormat<? super E> itemFormat, boolean disposeSource); }
DefaultEventComboViewer implements ListEventListener<E> { public Combo getCombo() { return combo; } DefaultEventComboViewer(EventList<E> source, Combo combo);  DefaultEventComboViewer(EventList<E> source, Combo combo, ItemFormat<? super E> itemFormat); protected  DefaultEventComboViewer(EventList<E> source, Combo combo,
			ItemFormat<? super E> itemFormat, boolean disposeSource); Combo getCombo(); ItemFormat<? super E> getItemFormat(); @Override void listChanged(ListEvent<E> listChanges); void dispose(); }
DefaultEventComboViewer implements ListEventListener<E> { public Combo getCombo() { return combo; } DefaultEventComboViewer(EventList<E> source, Combo combo);  DefaultEventComboViewer(EventList<E> source, Combo combo, ItemFormat<? super E> itemFormat); protected  DefaultEventComboViewer(EventList<E> source, Combo combo,
			ItemFormat<? super E> itemFormat, boolean disposeSource); Combo getCombo(); ItemFormat<? super E> getItemFormat(); @Override void listChanged(ListEvent<E> listChanges); void dispose();  }