|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.denova.ui.Fonts
Common fonts. Too many fonts spoil the look of an application. This class provides a standard font set. It also includes a locale-safe setFont(). For great fonts, you have to turn on anti-aliasing. By default it's off in Sun java 5 and 6. One option is to add this to your main() method, before doing anything at all with Swing:
// set anti-aliasing
System.getProperties().setProperty("swing.aatext", "true");
Another option is to set the "swing.aatext" property on the java
command line by adding:
-Dswing.aatext=true
This class also sets swing.aatext=true in a static initializer, but
there's no guarantee that this static code will run before any Swing code.
Copyright 2008 DeNova
All rights reserved worldwide
| Field Summary | |
static java.awt.Font |
Big
Standard big font. |
static float |
BigPointSize
The BigPointSize is larger than the Dialog point size. |
static java.awt.Font |
Bold
Standard bold font. |
static java.awt.Font |
Dialog
The Dialog font is the default font for a JComponent on the current platform. |
static java.awt.Font |
Header
Standard header font; bigger than Big. |
static float |
HeaderPointSize
The HeaderPointSize is much larger the Dialog point size. |
static java.awt.Font |
Italic
Standard italic font. |
static java.awt.Font |
Plain
Standard plain font. |
static float |
PointSize
The default PointSize is the size of the Dialog font. |
static java.awt.Font |
Small
|
static float |
SmallPointSize
The SmallPointSize is smaller than the Dialog point size. |
| Constructor Summary | |
Fonts()
|
|
| Method Summary | |
static void |
setFont(javax.swing.JComponent component,
java.awt.Font font)
Set the font for a JComponent. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.awt.Font Dialog
public static float PointSize
public static java.awt.Font Plain
public static java.awt.Font Bold
public static java.awt.Font Italic
public static float SmallPointSize
public static java.awt.Font Small
public static float BigPointSize
public static java.awt.Font Big
public static float HeaderPointSize
public static java.awt.Font Header
| Constructor Detail |
public Fonts()
| Method Detail |
public static void setFont(javax.swing.JComponent component,
java.awt.Font font)
component - where to set the fontfont - new font
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||