0
のためにロードされていない私は、CSSファイルがあります。CSSクラスはImageViewのはJavaFXの
.-fx-attribute-label {
-fx-min-width: 50;
-fx-font-weight: bold;
}
...
.img-view {
-fx-stroke-width: 2.0;
}
.img-view:hover {
-fx-stroke: #70c0e7;
}
.img-view:selected {
-fx-stroke: #26A0DA;
}
を、私はImageViewのにIMG-ビュークラスを追加してみてください:私が選択したときにホバー上でハイライト表示し、必要
pairStream.forEach(id -> {
final ImageView imgView = new ImageView(id.getValue());
imgView.getStyleClass().add("img-view");
facesView.getChildren().add(imgView); //facesView is Hbox which contains imageViews as children
...
});
をが、それは動作しません。 -fx-attribute-labelのような他のクラスが動作するので、CSSファイルがロードされていることがわかります。なぜそれはimg-viewクラスのためだけに働いていないのですか?
ありがとうございました! – xav9211