Swing/IndeterminateCycleTime のバックアップ差分(No.3)
- バックアップ一覧
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- バックアップ を表示
- Swing/IndeterminateCycleTime へ行く。
- 追加された行はこの色です。
- 削除された行はこの色です。
--- category: swing folder: IndeterminateCycleTime title: JProgressBarの不確定進捗サイクル時間を設定 tags: [JProgressBar, UIManager] author: aterai pubdate: 2013-07-15T00:07:35+09:00 description: JProgressBarの不確定進捗状態アニメーションで使用するサイクル時間などを設定します。 image: https://lh3.googleusercontent.com/--xwJeUKsm8k/UeK6iFE0vkI/AAAAAAAABvw/SNNt1mvM4_c/s800/IndeterminateCycleTime.png --- * 概要 [#jb5c5627] * 概要 [#summary] `JProgressBar`の不確定進捗状態アニメーションで使用するサイクル時間などを設定します。 #download(https://lh3.googleusercontent.com/--xwJeUKsm8k/UeK6iFE0vkI/AAAAAAAABvw/SNNt1mvM4_c/s800/IndeterminateCycleTime.png) * サンプルコード [#j513611b] * サンプルコード [#sourcecode] #code(link){{ UIManager.put("ProgressBar.repaintInterval", (Integer)repaintIntervalSpinner.getValue()); UIManager.put("ProgressBar.cycleTime", (Integer)cycleTimeSpinner.getValue()); UIManager.put("ProgressBar.repaintInterval", (Integer) repaintIntervalSpinner.getValue()); UIManager.put("ProgressBar.cycleTime", (Integer) cycleTimeSpinner.getValue()); progressBar.setIndeterminate(true); }} * 解説 [#e182a443] * 解説 [#explanation] 上記のサンプルでは、`UIManager`を使って`JProgressBar`の不確定進捗のアニメーションで使用するサイクル時間と再ペイント間隔をミリ秒で指定しています。 - サイクル時間 -- `UIManager.put("ProgressBar.cycleTime", 1000);` - 再ペイント間隔 -- `UIManager.put("ProgressBar.repaintInterval", 10);` - 注 -- サイクル時間が再ペイント間隔の偶数倍でない場合、サイクル時間は自動的にそうなるように増加する -- `WindowsLookAndFeel`などの場合、`JProgressBar#setIndeterminate(true);`が実行されたときに、これらの値は更新される * 参考リンク [#o33f138c] * 参考リンク [#reference] - [http://docs.oracle.com/javase/jp/7/technotes/guides/swing/1.4/pb.html 不確定進捗バー - Java™ 2 SDK, Standard Edition, v 1.4 での Swing の変更点および新機能] * コメント [#d3fbc6c6] * コメント [#comment] #comment #comment