Index: src/org/openide/loaders/TemplateWizard.java =================================================================== RCS file: /cvs/openide/src/org/openide/loaders/TemplateWizard.java,v retrieving revision 1.67 diff -u -r1.67 TemplateWizard.java --- src/org/openide/loaders/TemplateWizard.java 29 Jan 2003 01:42:48 -0000 1.67 +++ src/org/openide/loaders/TemplateWizard.java 13 Feb 2003 19:01:33 -0000 @@ -369,7 +369,7 @@ // Message which cancelled the previous attempt to instantiate the // template Throwable thrownMessage = null; - + try { while (true) { // it should loop only in case of IllegalStateException @@ -429,7 +429,10 @@ Object option = getValue(); if(option == FINISH_OPTION || option == YES_OPTION || option == OK_OPTION) { - + + // show wait cursor + showWaitCursor (); + return handleInstantiate(); } else { return null; @@ -440,11 +443,51 @@ } } } finally { + // set normal cursor back + showNormalCursor (); if (iterator != null) { iterator.uninitialize(); } + + } + } + + private void showWaitCursor () { + // + // waiting times + // + try { + System.out.println("SHOW WAIT ...."); + javax.swing.JFrame f = (javax.swing.JFrame)org.openide.windows.WindowManager.getDefault ().getMainWindow (); + Component c = f.getGlassPane (); + c.setVisible (true); + c.setCursor (java.awt.Cursor.getPredefinedCursor (java.awt.Cursor.WAIT_CURSOR)); + } catch (java.lang.Exception e) { + // the debug messages + System.out.println ("*************************************************************"); + e.printStackTrace (); + System.out.println ("*************************************************************"); + } + } + + private void showNormalCursor () { + // + // normal times + // + try { + javax.swing.JFrame f = (javax.swing.JFrame)org.openide.windows.WindowManager.getDefault ().getMainWindow (); + Component c = f.getGlassPane (); + c.setCursor (null); + c.setVisible (false); + System.out.println("SHOW NORMAL ...."); + } catch (java.lang.Exception e) { + // the debug messages + System.out.println ("*************************************************************"); + e.printStackTrace (); + System.out.println ("*************************************************************"); } } + /** Overriden to be able to set own default value for the title format.*/ public void setTitleFormat (MessageFormat format) {