KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > thinlet > drafts > Utilities


1 package thinlet.drafts;
2
3 import java.awt.*;
4
5 /**
6  *
7  */

8 public class Utilities {
9     
10     private static Utilities utilities;
11     
12     /**
13      *
14      */

15     public static Utilities getUtilities() {
16         if (utilities == null) {
17             try {
18                 Class.forName("java.awt.GraphicsEnvironment");
19                 utilities = (Utilities) Class.forName("thinlet.drafts.Utilities2").newInstance();
20             } catch (Exception JavaDoc exc) { /* not 1.4 */
21                 utilities = new Utilities();
22             }
23         }
24         return utilities;
25     }
26     
27     /**
28      *
29      */

30     public String JavaDoc[] getFontList() {
31         return Toolkit.getDefaultToolkit().getFontList();
32     }
33     
34     /**
35      *
36      */

37     public Object JavaDoc getDesktopProperty(String JavaDoc key) {
38         return null;
39     }
40     
41     /**
42      *
43      */

44     public void initGraphics(Graphics g) {
45     }
46 }
Popular Tags