あなたは、最新のJDK 8の早期アクセスを使用していますか?もしそうなら、私が提出したこのバグレポートを見てください:http://javafx-jira.kenai.com/browse/RT-29018
基本的に、最近のリリースの初期アクセスビルドでは、彼らはスキンとCSSにいくつかの変更を加えました。これにより、隠れたバグが明らかになりました。親ノードよりも汚れていても、同じパルスで再描画が必要な子ノードでは、親のダーティレベルが子ノードのダーティレベルを上書きしてしまいます。
これにより、進捗状況が表示されなくなり、実際にはprogressBar
が完全に見えなくなりました。ただちにupdateProgress
がタスクから呼び出されました。彼らはその場所にパッチを持っている、私はこれがいつ進むのか分からない。
回避策、いずれかのパッチを待っている間にJDK7使用するか、またはあなたは私がやったんや、あなたのCSSスタイルシートの中に古いCSSからこれを適用することができます。
/*hack to get progress bar working. From: JDK7u17 jfxrt.jar!/com/sun/javafx/scene/control/skin/caspian/caspian.css */
/*******************************************************************************
* *
* ProgressBar *
* *
******************************************************************************/
.progress-bar {
-fx-skin: "com.sun.javafx.scene.control.skin.ProgressBarSkin";
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-color,30%) 5%, derive(-fx-color,-17%));
-fx-background-insets: 0, 1;
-fx-indeterminate-bar-length: 60;
-fx-indeterminate-bar-escape: true;
-fx-indeterminate-bar-flip: true;
-fx-indeterminate-bar-animation-time: 2;
-fx-focus-traversable: true;
}
.progress-bar .bar {
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-accent,95%), derive(-fx-accent,10%)),
linear-gradient(to bottom, derive(-fx-accent,38%), -fx-accent);
-fx-background-insets: 0, 1, 2;
-fx-padding: 0.416667em; /* 5 */
}
.progress-bar:indeterminate .bar {
-fx-background-color: linear-gradient(to left, transparent, -fx-accent);
}
.progress-bar .track {
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-color,-15%), derive(-fx-color,2.2%) 20%, derive(-fx-color,60%));
-fx-background-insets: 0, 1;
}
.progress-bar:disabled {
-fx-opacity: 1.0
}
私はあなたのコードをコピーして、それだけで完璧に動作します。私は何とかそれを誤って統合しましたか?私はそれをサブクラスで使用し、静的な方法でプログレスバーにアクセスする必要があります。これは何らかのトラブルを引き起こす可能性があります私は7v17 btwを使用して – Chromos
編集:guiはfxmlシートで設計されています。 – Chromos
パッチはすでに@jewelseaで入手できますか? –