@Test public void testTableItemConfigurer() { final EventList<Color> source = GlazedLists.eventList(RGBNull); final TableFormat<Color> tableFormat = GlazedLists.tableFormat(new String[] { "red", "green", "blue" }, new String[] { "Red", "Green", "Blue" }); final Table table = new Table(getShell(), SWT.CHECK | SWT.VIRTUAL); EventTableViewer<Color> viewer = new EventTableViewer<>(source, table, tableFormat); doTestDefaultConfigurer(table, viewer); viewer.setTableItemConfigurer(new ColorTableItemConfigurer()); assertNotSame(TableItemConfigurer.DEFAULT, viewer.getTableItemConfigurer()); assertEquals(4, table.getItemCount()); assertEquals("Red=255", table.getItem(0).getText(0)); assertEquals("Green=0", table.getItem(0).getText(1)); assertEquals("Blue=0", table.getItem(0).getText(2)); assertEquals("Red=0", table.getItem(1).getText(0)); assertEquals("Green=255", table.getItem(1).getText(1)); assertEquals("Blue=0", table.getItem(1).getText(2)); assertEquals("Red=0", table.getItem(2).getText(0)); assertEquals("Green=0", table.getItem(2).getText(1)); assertEquals("Blue=255", table.getItem(2).getText(2)); assertEquals("Red=null", table.getItem(3).getText(0)); assertEquals("Green=null", table.getItem(3).getText(1)); assertEquals("Blue=null", table.getItem(3).getText(2)); viewer.setTableItemConfigurer(TableItemConfigurer.DEFAULT); doTestDefaultConfigurer(table, viewer); try { viewer.setTableItemConfigurer(null); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException ex) { } assertSame(TableItemConfigurer.DEFAULT, viewer.getTableItemConfigurer()); viewer.dispose(); }
@Override public void dispose() { if (swtThreadSource != null) swtThreadSource.dispose(); super.dispose(); swtThreadSource = null; }
EventTableViewer extends DefaultEventTableViewer<E> { @Override public void dispose() { if (swtThreadSource != null) swtThreadSource.dispose(); super.dispose(); swtThreadSource = null; } }
EventTableViewer extends DefaultEventTableViewer<E> { @Override public void dispose() { if (swtThreadSource != null) swtThreadSource.dispose(); super.dispose(); swtThreadSource = null; } @Deprecated  EventTableViewer(EventList<E> source, Table table, String[] propertyNames, String[] columnLabels);  EventTableViewer(EventList<E> source, Table table, TableFormat<? super E> tableFormat);  EventTableViewer(EventList<E> source, Table table, TableFormat<? super E> tableFormat,
            TableItemConfigurer<? super E> tableItemConfigurer); private  EventTableViewer(EventList<E> source, EventList<E> swtProxySource, Table table, TableFormat<? super E> tableFormat,
            TableItemConfigurer<? super E> tableItemConfigurer); }
EventTableViewer extends DefaultEventTableViewer<E> { @Override public void dispose() { if (swtThreadSource != null) swtThreadSource.dispose(); super.dispose(); swtThreadSource = null; } @Deprecated  EventTableViewer(EventList<E> source, Table table, String[] propertyNames, String[] columnLabels);  EventTableViewer(EventList<E> source, Table table, TableFormat<? super E> tableFormat);  EventTableViewer(EventList<E> source, Table table, TableFormat<? super E> tableFormat,
            TableItemConfigurer<? super E> tableItemConfigurer); private  EventTableViewer(EventList<E> source, EventList<E> swtProxySource, Table table, TableFormat<? super E> tableFormat,
            TableItemConfigurer<? super E> tableItemConfigurer); @Override void dispose(); }
EventTableViewer extends DefaultEventTableViewer<E> { @Override public void dispose() { if (swtThreadSource != null) swtThreadSource.dispose(); super.dispose(); swtThreadSource = null; } @Deprecated  EventTableViewer(EventList<E> source, Table table, String[] propertyNames, String[] columnLabels);  EventTableViewer(EventList<E> source, Table table, TableFormat<? super E> tableFormat);  EventTableViewer(EventList<E> source, Table table, TableFormat<? super E> tableFormat,
            TableItemConfigurer<? super E> tableItemConfigurer); private  EventTableViewer(EventList<E> source, EventList<E> swtProxySource, Table table, TableFormat<? super E> tableFormat,
            TableItemConfigurer<? super E> tableItemConfigurer); @Override void dispose();  }