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

Quick Search    Search Deep

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


1   package javax.ide.view;
2   
3   import javax.ide.spi.ProviderNotFoundException;
4   import javax.ide.Service;
5   
6   /**
7    * The GUIUtilities provide access to the {@link IDEDialogs}, a 
8    * {@link WaitCursor} and a {@link ProgressMonitor} objects that extension 
9    * writers use for * time consuming tasks.<p>
10   *
11   * @see javax.ide.Service
12   */
13  public abstract class GUIUtilities extends Service 
14  {
15  
16    /**
17     * Get the {@link IDEDialogs} that can be used to show standard IDE 
18     * dialogs.
19     * @return the {@link IDEDialogs}.
20     */
21    public abstract IDEDialogs getIDEDialogs();
22  
23    /**
24     * Get a wait cursor indicating that a time consuming operation is 
25     * in progress.
26     * 
27     * @return a {@link WaitCursor}. 
28     */
29    public abstract WaitCursor getWaitCursor();
30      
31    /**
32     * Get a progress monitor to show that a time consuming operation is 
33     * in progress.
34     * 
35     * @return a {@link ProgressMonitor}. 
36     */
37    public abstract ProgressMonitor getProgressMonitor();
38  
39    /**
40     * Get the GUIUtilities service for this IDE.
41     * 
42     * @return gui utilities for this ide.
43     */
44    public static GUIUtilities getGUIUtilities()
45    {
46      try
47      {
48        return (GUIUtilities) getService( GUIUtilities.class );
49      }
50      catch ( ProviderNotFoundException lnfe )
51      {
52        lnfe.printStackTrace();
53        throw new IllegalStateException( "No gui utilities" );
54      }
55    }
56  
57  }
58