@Test @ExecuteOnNonUiThread public void testOnMainThreadInstallEDTViolation() { try { JXTableSupport.install(table, colors, colorTableFormat, sortedColors, TableComparatorChooser.SINGLE_COLUMN); fail("failed to receive IllegalStateException because of wrong thread usage"); } catch (IllegalStateException ex) { } }
public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { Preconditions.checkNotNull(table, "JXTable must be defined."); Preconditions.checkNotNull(eventList, "EventList must be defined."); Preconditions.checkNotNull(tableFormat, "TableFormat must be defined."); Preconditions.checkNotNull(sortedList, "SortedList must be defined."); Preconditions.checkNotNull(sortingStrategy, "SortingStrategy must be defined."); checkAccessThread(); return new JXTableSupport<>(table, eventList, tableFormat, sortedList, sortingStrategy); }
JXTableSupport { public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { Preconditions.checkNotNull(table, "JXTable must be defined."); Preconditions.checkNotNull(eventList, "EventList must be defined."); Preconditions.checkNotNull(tableFormat, "TableFormat must be defined."); Preconditions.checkNotNull(sortedList, "SortedList must be defined."); Preconditions.checkNotNull(sortingStrategy, "SortingStrategy must be defined."); checkAccessThread(); return new JXTableSupport<>(table, eventList, tableFormat, sortedList, sortingStrategy); } }
JXTableSupport { public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { Preconditions.checkNotNull(table, "JXTable must be defined."); Preconditions.checkNotNull(eventList, "EventList must be defined."); Preconditions.checkNotNull(tableFormat, "TableFormat must be defined."); Preconditions.checkNotNull(sortedList, "SortedList must be defined."); Preconditions.checkNotNull(sortingStrategy, "SortingStrategy must be defined."); checkAccessThread(); return new JXTableSupport<>(table, eventList, tableFormat, sortedList, sortingStrategy); } private  JXTableSupport(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); }
JXTableSupport { public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { Preconditions.checkNotNull(table, "JXTable must be defined."); Preconditions.checkNotNull(eventList, "EventList must be defined."); Preconditions.checkNotNull(tableFormat, "TableFormat must be defined."); Preconditions.checkNotNull(sortedList, "SortedList must be defined."); Preconditions.checkNotNull(sortingStrategy, "SortingStrategy must be defined."); checkAccessThread(); return new JXTableSupport<>(table, eventList, tableFormat, sortedList, sortingStrategy); } private  JXTableSupport(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); static JXTableSupport<E> install(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); JXTable getTable(); AdvancedListSelectionModel<E> getTableSelectionModel(); AdvancedTableModel<E> getTableModel(); TableFormat<? super E> getTableFormat(); TableComparatorChooser<E> getTableComparatorChooser(); void uninstall(); boolean isInstalled(); }
JXTableSupport { public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { Preconditions.checkNotNull(table, "JXTable must be defined."); Preconditions.checkNotNull(eventList, "EventList must be defined."); Preconditions.checkNotNull(tableFormat, "TableFormat must be defined."); Preconditions.checkNotNull(sortedList, "SortedList must be defined."); Preconditions.checkNotNull(sortingStrategy, "SortingStrategy must be defined."); checkAccessThread(); return new JXTableSupport<>(table, eventList, tableFormat, sortedList, sortingStrategy); } private  JXTableSupport(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); static JXTableSupport<E> install(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); JXTable getTable(); AdvancedListSelectionModel<E> getTableSelectionModel(); AdvancedTableModel<E> getTableModel(); TableFormat<? super E> getTableFormat(); TableComparatorChooser<E> getTableComparatorChooser(); void uninstall(); boolean isInstalled();  }