javafx GridView не обновляет HBox
Спасибо за помощь. Я пытаюсь использовать HBox в качестве ячейки GridView в javafx. В этом GridView у меня уже есть много других элементов, которые отлично работают. Эти две колонки работают нормально и отображаются правильно
public static TableColumn<Giro, ImageView> BestRacerLap() {
TableColumn<Giro, ImageView> ColBest = new TableColumn<>("Bst Rac");
ColBest.setCellValueFactory(new PropertyValueFactory<Giro, ImageView>("Img_BstRacerLap"));
ColBest.setSortable(false);
return ColBest;
}
public static TableColumn<Giro, ImageView> BestALLLap() {
TableColumn<Giro, ImageView> ColBest3 = new TableColumn<>("Bst All");
ColBest3.setCellValueFactory(new PropertyValueFactory<Giro, ImageView>("Img_BstALLLap"));
ColBest3.setSortable(false);
return ColBest3;
}
Конструктор
static TableView<Giro> Tabella_BASE = new TableView<>(GIRI_TOT);
Tabella_BASE.getColumns().addAll(Griglia_Giri_Principale.BestRacerLap(),
Griglia_Giri_Principale.BestALLLap());
И модель это:
public class Giro {
Image Immagine_BestRacer_Lap = new Image("...");
final ImageView Img_BstRacerLap = new ImageView(Immagine_BestRacer_Lap);
Image Immagine_BestALL_Lap = new Image("...");
final ImageView Img_BstALLLap = new ImageView(Immagine_BestALL_Lap);
public HBox Colonna_Info ;
public Giro(LocalDateTime Passaggio_prima_Racer, racer RACER){
Img_BstRacerLap.visibleProperty().bind(IstheBest);
Img_BstALLLap.visibleProperty().bind(IstheBestofALL);
Colonna_Info = new HBox(Img_BstRacerLap,Img_BstALLLap);
}
//Elemets
public ImageView getImg_BstRacerLap(){return Img_BstRacerLap;}
public ImageView getImg_BstALLLap(){return Img_BstALLLap;}
public HBox getColonna_Info(){return Colonna_Info = new HBox(Img_BstRacerLap,Img_BstALLLap);}
}
эти вещи работают нормально только для столбцов с одним изображением, а не для столбца HBox (см. внизу). В общем, я хочу использовать HBox в качестве ячейки tableView, с некоторым изменяемым параметром, привязанным к другому параметру. Проблема в том, что если я хочу использовать HBox для отображения этих двух изображений в 1 столбце, то ничего не появится. Это код, который не работает:
public static TableColumn<Giro, HBox> ColonnaInfoGrafico() {
TableColumn<Giro, HBox> ColInfo = new TableColumn<>("Best");
ColInfo.setCellValueFactory(new PropertyValueFactory<Giro, HBox>("Colonna_Info"));
ColInfo.setSortable(false);
return ColInfo;
}
Заранее спасибо.