Swing/IndeterminateCycleTime のバックアップ(No.1)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- Swing/IndeterminateCycleTime へ行く。
- 1 (2013-07-17 (水) 14:56:10)
- 2 (2015-02-19 (木) 18:39:48)
- 3 (2016-12-13 (火) 16:18:55)
- 4 (2017-12-05 (火) 18:38:04)
- 5 (2018-02-20 (火) 19:10:32)
- 6 (2020-02-14 (金) 16:22:06)
- 7 (2021-08-03 (火) 14:56:26)
- 8 (2025-01-03 (金) 08:57:02)
- 9 (2025-01-03 (金) 09:01:23)
- 10 (2025-01-03 (金) 09:02:38)
- 11 (2025-01-03 (金) 09:03:21)
- 12 (2025-01-03 (金) 09:04:02)
- 13 (2025-06-19 (木) 12:41:37)
- 14 (2025-06-19 (木) 12:43:47)
TITLE:JProgressBarの不確定進捗サイクル時間を設定
Posted by aterai at 2013-07-15
JProgressBarの不確定進捗サイクル時間を設定
`JProgressBar
`の不確定進捗状態アニメーションで使用するサイクル時間などを設定します。
- &jnlp;
- &jar;
- &zip;
サンプルコード
UIManager.put("ProgressBar.repaintInterval", (Integer)repaintIntervalSpinner.getValue());
UIManager.put("ProgressBar.cycleTime", (Integer)cycleTimeSpinner.getValue());
progressBar.setIndeterminate(true);
View in GitHub: Java, Kotlin解説
上記のサンプルでは、`UIManager
を使って
JProgressBar
`の不確定進捗のアニメーションで使用するサイクル時間と再ペイント間隔をミリ秒で指定しています。
- サイクル時間
- `
UIManager.put("ProgressBar.cycleTime", 1000);
`
- `
- 再ペイント間隔
- `
UIManager.put("ProgressBar.repaintInterval", 10);
`
- `
- 注
- サイクル時間が再ペイント間隔の偶数倍になっていない場合、サイクル時間が自動的にそうなるように増加する
- `
WindowsLookAndFeel
などの場合、
JProgressBar#setIndeterminate(true);
`が実行されたときに、これらの値は更新される