Swing/MillisToDecideToPopup のバックアップ差分(No.5)
- バックアップ一覧
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- バックアップ を表示
- Swing/MillisToDecideToPopup へ行く。
- 追加された行はこの色です。
- 削除された行はこの色です。
--- category: swing folder: MillisToDecideToPopup title: ProgressMonitorがダイアログを表示するまでの待ち時間 tags: [ProgressMonitor, SwingWorker, JProgressBar] author: aterai pubdate: 2013-04-15T03:02:27+09:00 description: ProgressMonitorのダイアログが表示されるまでの待ち時間を設定します。 image: https://lh6.googleusercontent.com/-R5-8dJERlmk/UWrm3iXBukI/AAAAAAAABpk/i7YjNRcIkpM/s800/MillisToDecideToPopup.png --- * 概要 [#summary] `ProgressMonitor`のダイアログが表示されるまでの待ち時間を設定します。 #download(https://lh6.googleusercontent.com/-R5-8dJERlmk/UWrm3iXBukI/AAAAAAAABpk/i7YjNRcIkpM/s800/MillisToDecideToPopup.png) * サンプルコード [#sourcecode] #code(link){{ monitor = new ProgressMonitor(w, "message", "note", 0, 100); monitor.setMillisToDecideToPopup((int) millisToDecideToPopup.getValue()); monitor.setMillisToPopup((int) millisToPopup.getValue()); }} * 解説 [#explanation] - [http://docs.oracle.com/javase/jp/6/api/javax/swing/ProgressMonitor.html#getMillisToDecideToPopup() `ProgressMonitor#setMillisToDecideToPopup(int)`] -- `ProgressMonitor`のダイアログを表示するかどうかを決めるまでの待ち時間を設定 -- デフォルト: `500`ミリ秒 -- この待ち時間の間は`ProgressMonitor`のダイアログは表示されない -- この待ち時間が経過するまで`ProgressMonitor`のダイアログは表示されない --- `ProgressMonitor`で使用する`JProgressBar`が`null`でない場合(`ProgressMonitor`を使い回しして`ProgressMonitor#close()`されていないなど)は、無視してダイアログが表示される場合がある - [http://docs.oracle.com/javase/jp/6/api/javax/swing/ProgressMonitor.html#getMillisToPopup() `ProgressMonitor#setMillisToPopup(int)`] -- `ProgressMonitor`のダイアログが表示されるまでの待ち時間を設定 -- デフォルト: `2000`ミリ秒 -- 予想残り時間がこの時間より短い場合、ダイアログは表示されない --- 予想残り時間は、`JProgressBar`の進捗状況(パーセント)と処理開始からの時間で計算される -- `ProgressMonitor#getMillisToDecideToPopup()`からの待ち時間ではなく独立している(処理開始からの待ち時間になる) --- `ProgressMonitor#getMillisToDecideToPopup()`以下の場合は、その直後にダイアログが表示される * 参考リンク [#reference] - [[ProgressMonitorで処理の進捗を表示>Swing/ProgressMonitor]] * コメント [#comment] #comment #comment