いくつかの PanelDescriptor を持つ Wizard Iterator があります。WizardDescriptor.ValidatingPanel を実装する 1 つの PanelDescriptor で [次へ] をクリックすると、待機カーソルを表示しようとしています。実行に時間がかかる validate() メソッド。
これまでのところ、いくつかの方法を試しましたが、どれもうまくいきません。
- http://dev.platform.netbeans.narkive.com/ofiffInN/finally-a-waitcursor-routine-that-works-in-netbeans
http://netbeans-org.1045718.n5.nabble.com/Setting-wait-cursor-td3026613.html#a3026614
private static void changeCursorWaitStatus(final boolean isWaiting) { Mutex.EVENT.writeAccess(new Runnable() { public void run() { try { JFrame mainFrame = (JFrame) WindowManager.getDefault().getMainWindow(); Component glassPane = mainFrame.getGlassPane(); if (isWaiting) { glassPane.setVisible(true); glassPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); } else { glassPane.setVisible(false); glassPane.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } catch (Exception e) { // probably not worth handling } } }); }
https://community.oracle.com/message/5322657#5322657
try { TopComponent.getRegistry().getActivated().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); doBusyStuff(); } finally { TopComponent.getRegistry().getActivated().setCursor(Cursor.getDefaultCursor()); }
私を正しい方向に向けるヒントがあれば幸いです。