KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > admin > HelpHelper


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.admin;
5
6 import java.net.URL JavaDoc;
7
8 import javax.swing.Icon JavaDoc;
9 import javax.swing.ImageIcon JavaDoc;
10
11 public class HelpHelper extends BaseHelper {
12   private static HelpHelper m_helper = new HelpHelper();
13   private Icon JavaDoc m_helpIcon;
14
15   public static HelpHelper getHelper() {
16     return m_helper;
17   }
18
19   public Icon JavaDoc getHelpIcon() {
20     if(m_helpIcon == null) {
21       URL JavaDoc url = getClass().getResource(ICONS_PATH+"help.gif");
22       
23       if(url != null) {
24         m_helpIcon = new ImageIcon JavaDoc(url);
25       }
26     }
27
28     return m_helpIcon;
29   }
30 }
31
Popular Tags