|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.looks.FontUtils
public final class FontUtils
Provides convenience behavior to set font defaults. Used by the JGoodies look&feel implementations.
FontSizeHints
Method Summary | |
---|---|
static Font |
getControlFont(UIDefaults table,
FontSizeHints hints)
Computes and answers the control font using the specified UIDefaults and FontSizeHints . |
static Font |
getMenuFont(UIDefaults table,
FontSizeHints hints)
Computes and answers the menu font using the specified UIDefaults and FontSizeHints . |
static void |
initFontDefaults(UIDefaults table,
Object controlFont,
Object controlBoldFont,
Object fixedControlFont,
Object menuFont,
Object messageFont,
Object toolTipFont,
Object windowFont)
Sets different fonts to all known widget defaults. |
static boolean |
useSystemFontSettings()
Checks and answers if we shall use system font settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean useSystemFontSettings()
First checks whether system fonts have been explicitly turned off in the system properties. Then checks whether a property has been set in the UIManager.
public static void initFontDefaults(UIDefaults table, Object controlFont, Object controlBoldFont, Object fixedControlFont, Object menuFont, Object messageFont, Object toolTipFont, Object windowFont)
menuFont
is null,
the given defaults won't be overriden.
table
- the UIDefaults table used to set fontscontrolFont
- the control font to be setcontrolBoldFont
- a bold version of the control fontfixedControlFont
- a fixed size control fontmenuFont
- the font used for menusmessageFont
- the font used in messagetoolTipFont
- the font used in tool tipswindowFont
- the general dialog fontpublic static Font getMenuFont(UIDefaults table, FontSizeHints hints)
UIDefaults
and FontSizeHints
.The defaults can be overriden using the system property "jgoodies.menuFont". You can set this property either by setting VM runtime arguments, e.g.
-Djgoodies.menuFont=Tahoma-PLAIN-11or by setting them during the application startup process, e.g.
System.setProperty(Options.MENU_FONT_KEY, "dialog-BOLD-12");
table
- the UIDefaults table to work withhints
- the FontSizeHints used to determine the menu font
public static Font getControlFont(UIDefaults table, FontSizeHints hints)
UIDefaults
and FontSizeHints
.The defaults can be overriden using the system property "jgoodies.controlFont". You can set this property either by setting VM runtime arguments, e.g.
-Djgoodies.controlFont=Tahoma-PLAIN-14or by setting them during the application startup process, e.g.
System.setProperty(Options.CONTROL_FONT_KEY, "Arial-ITALIC-12");
table
- the UIDefaults table to work withhints
- the FontSizeHints used to determine the control font
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |