Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/view/WaitCursor.java


1   package javax.ide.view;
2   
3   
4   /**
5    * <code>WaitCursor</code> interface. A wait cursor should be used by 
6    * extension writers when an extension executes a time consuming task.
7    * To show the wait cursor call <code>show</code>. Once the time consuming 
8    * task concludes, call <code>hide</code> to remove the wait cursor. These 
9    * calls must happen on the event thread.
10   *
11   * To show a wait cursor:
12   * <pre>
13   * import javax.ide.view.WaitCursor;
14   *
15   * // ...
16   *
17   * void doSomethingTimeConsuming()
18   * {
19   *   WaitCursor wc = Ide.getGUIUtilities().getWaitCursor();
20   *   try
21   *   {
22   *      wc.show();
23   *
24   *      //...
25   *   } 
26   *   finally
27   *   {
28   *      wc.hide();
29   *   }
30   * }
31   * </pre>
32   */
33  public interface WaitCursor {
34  
35      /**
36       * Schedules the wait cursor to be shown after the specified number of 
37       * milliseconds has elapsed. If {@link WaitCursor#hide} is called before
38       * the delay has elapsed, then the wait cursor is not shown. <p>
39       *
40       * Nested call to this method are acceptable. There must be a call to 
41       * the <code>hide</code> method for every call to <code>show</code>.
42       * This method must be called from the event thread.
43       *
44       * @param delay the number of milliseconds to dealy before showing the 
45       * wait cursor.
46       */
47      void show( int delay );
48      
49      /**
50       * Hide the wait cursor.<p>
51       *
52       * Nested call to this method are acceptable. There must be a call to 
53       * the <code>hide</code> method for every call to <code>show</code>.
54       * This method must be called from the event thread.
55       */
56      void hide();
57  }