-
Bug
-
Resolution: Fixed
-
P4
-
7u15
It sorts the first time (false first) and then that's it, the triangle keeps on changing but no sort occurs
List<Boolean> data = new ArrayList(10);
for (int i = 0; i < 10; i++) {
data.add(new Boolean(i % 2 == 0));
}
TableView<Boolean> tv = new TableView<Boolean>();
tv.getItems().setAll(data);
TableColumn tc0 = new TableColumn("Parent");
tv.getColumns().add(tc0);
TableColumn<Boolean, Boolean> tc1 = new TableColumn<Boolean, Boolean>("Col1");
tc1.setCellValueFactory(new Callback<CellDataFeatures<Boolean, Boolean>, ObservableValue<Boolean>>() {
@Override
public ObservableValue<Boolean> call(
CellDataFeatures<Boolean, Boolean> param) {
return new ReadOnlyObjectWrapper<>(param.getValue());
}
});
tc0.getColumns().add(tc1);
TableColumn<Boolean, Boolean> tc2 = new TableColumn<Boolean, Boolean>("Col2");
tc2.setCellValueFactory(new Callback<CellDataFeatures<Boolean, Boolean>, ObservableValue<Boolean>>() {
@Override
public ObservableValue<Boolean> call(
CellDataFeatures<Boolean, Boolean> param) {
return new ReadOnlyObjectWrapper<>(param.getValue());
}
});
tc0.getColumns().add(tc2);
Scene scene = new Scene(tv, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
List<Boolean> data = new ArrayList(10);
for (int i = 0; i < 10; i++) {
data.add(new Boolean(i % 2 == 0));
}
TableView<Boolean> tv = new TableView<Boolean>();
tv.getItems().setAll(data);
TableColumn tc0 = new TableColumn("Parent");
tv.getColumns().add(tc0);
TableColumn<Boolean, Boolean> tc1 = new TableColumn<Boolean, Boolean>("Col1");
tc1.setCellValueFactory(new Callback<CellDataFeatures<Boolean, Boolean>, ObservableValue<Boolean>>() {
@Override
public ObservableValue<Boolean> call(
CellDataFeatures<Boolean, Boolean> param) {
return new ReadOnlyObjectWrapper<>(param.getValue());
}
});
tc0.getColumns().add(tc1);
TableColumn<Boolean, Boolean> tc2 = new TableColumn<Boolean, Boolean>("Col2");
tc2.setCellValueFactory(new Callback<CellDataFeatures<Boolean, Boolean>, ObservableValue<Boolean>>() {
@Override
public ObservableValue<Boolean> call(
CellDataFeatures<Boolean, Boolean> param) {
return new ReadOnlyObjectWrapper<>(param.getValue());
}
});
tc0.getColumns().add(tc2);
Scene scene = new Scene(tv, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();