KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > thinlet > drafts > Utilities2


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

8 public class Utilities2 extends Utilities {
9     
10     /**
11      *
12      */

13     public String JavaDoc[] getFontList() {
14         return GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
15     }
16     
17     /**
18      *
19      */

20     public Object JavaDoc getDesktopProperty(String JavaDoc key) {
21         return Toolkit.getDefaultToolkit().getDesktopProperty(key);
22     }
23     
24     /**
25      *
26      */

27     public void initGraphics(Graphics g) {
28         ((Graphics2D) g).setRenderingHint(
29             RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
30     }
31 }
Popular Tags