KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > navigation > base > Icons


1 /*
2  * Icons.java
3  *
4  * Created on November 8, 2006, 2:58 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.java.navigation.base;
11
12 import java.awt.Image JavaDoc;
13 import javax.swing.Icon JavaDoc;
14 import javax.swing.ImageIcon JavaDoc;
15 import org.openide.util.Utilities;
16
17 /** Capable of serving incns for the navigator modules. Notice that it is not
18  * used for Element icons. May not be necessary an may be removed later.
19  *
20  * @author phrebejk
21  */

22 public class Icons {
23     
24     private static final String JavaDoc GIF_EXTENSION = ".gif"; // NOI18N
25
private static final String JavaDoc ICON_BASE = "org/netbeans/modules/java/navigation/resources"; // NOI18N
26
private static final String JavaDoc WAIT = ICON_BASE + "wait" + GIF_EXTENSION; // NOI18N
27

28     /** Creates a new instance of Icons */
29     public Icons() {
30     }
31     
32     public static Icon JavaDoc getBusyIcon () {
33         Image JavaDoc img = Utilities.loadImage (WAIT);
34         if (img == null) {
35             return null;
36         }
37         else {
38             return new ImageIcon JavaDoc (img);
39         }
40     }
41     
42 }
43
Popular Tags