@Test
public void testSortOrderCleanup() {
ObservableList<ObservablePerson> persons = ObservablePerson.createFXPersonList();
TableView<ObservablePerson> table = new TableView<ObservablePerson>(persons);
TableColumn<String> first = new TableColumn<String>("first");
first.setProperty("firstName");
TableColumn<String> second = new TableColumn<String>("second");
second.setProperty("lastName");
table.getColumns().addAll(first, second);
table.getSortOrder().setAll(first, second);
table.getColumns().remove(first);
assertEquals(false, table.getSortOrder().contains(first));
}
public void testSortOrderCleanup() {
ObservableList<ObservablePerson> persons = ObservablePerson.createFXPersonList();
TableView<ObservablePerson> table = new TableView<ObservablePerson>(persons);
TableColumn<String> first = new TableColumn<String>("first");
first.setProperty("firstName");
TableColumn<String> second = new TableColumn<String>("second");
second.setProperty("lastName");
table.getColumns().addAll(first, second);
table.getSortOrder().setAll(first, second);
table.getColumns().remove(first);
assertEquals(false, table.getSortOrder().contains(first));
}