Package com.jgoodies.looks
Class FontSets
- java.lang.Object
-
- com.jgoodies.looks.FontSets
-
public final class FontSets extends java.lang.Object
Provides predefined FontSet implementations.- Since:
- 2.0
- Version:
- $Revision: 1.16 $
- See Also:
FontSet
,FontPolicy
,FontPolicies
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
FontSets.DefaultFontSet
private static class
FontSets.LogicalFontSet
Looks up and returns the logical fonts as specified by the Java runtime environment.
-
Field Summary
Fields Modifier and Type Field Description private static FontSet
logicalFontSet
-
Constructor Summary
Constructors Modifier Constructor Description private
FontSets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static javax.swing.plaf.FontUIResource
asFontUIResource(java.awt.Font font)
static FontSet
createDefaultFontSet(java.awt.Font controlFont)
Creates and returns a FontSet that is based only on the given control font.static FontSet
createDefaultFontSet(java.awt.Font controlFont, java.awt.Font menuFont)
Creates and returns a FontSet that is based on the given control font and menu font.static FontSet
createDefaultFontSet(java.awt.Font controlFont, java.awt.Font menuFont, java.awt.Font titleFont)
Creates and returns a FontSet that is based on the given control font and menu font.static FontSet
createDefaultFontSet(java.awt.Font controlFont, java.awt.Font menuFont, java.awt.Font titleFont, java.awt.Font messageFont, java.awt.Font smallFont, java.awt.Font windowTitleFont)
Creates and returns a FontSet for the given fonts.static FontSet
getLogicalFontSet()
Lazily creates and returns the FontSet that returns the logical fonts specified by the Java runtime environment.
-
-
-
Field Detail
-
logicalFontSet
private static FontSet logicalFontSet
-
-
Method Detail
-
createDefaultFontSet
public static FontSet createDefaultFontSet(java.awt.Font controlFont)
Creates and returns a FontSet that is based only on the given control font. The small font will be derived from the control font; all other fonts returned are the control font.- Parameters:
controlFont
- the font used for all controls- Returns:
- a FontSet based on the given fonts
- Throws:
java.lang.NullPointerException
- if the control font isnull
-
createDefaultFontSet
public static FontSet createDefaultFontSet(java.awt.Font controlFont, java.awt.Font menuFont)
Creates and returns a FontSet that is based on the given control font and menu font. The small font will be derived from the control font; all other fonts return, except the menu font, are the control font.- Parameters:
controlFont
- the font used for all controlsmenuFont
- the font used for the menu bar and menu items- Returns:
- a FontSet based on the given fonts
- Throws:
java.lang.NullPointerException
- if the control font isnull
-
createDefaultFontSet
public static FontSet createDefaultFontSet(java.awt.Font controlFont, java.awt.Font menuFont, java.awt.Font titleFont)
Creates and returns a FontSet that is based on the given control font and menu font. The small font will be derived from the control font; all other fonts return, except the menu font, are the control font.- Parameters:
controlFont
- the font used for all controlsmenuFont
- the font used for the menu bar and menu itemstitleFont
- used for TitledBorder, titles and titled separators- Returns:
- a FontSet based on the given fonts
- Throws:
java.lang.NullPointerException
- if the control font isnull
-
createDefaultFontSet
public static FontSet createDefaultFontSet(java.awt.Font controlFont, java.awt.Font menuFont, java.awt.Font titleFont, java.awt.Font messageFont, java.awt.Font smallFont, java.awt.Font windowTitleFont)
Creates and returns a FontSet for the given fonts. If a font isnull
, it uses the control font as fallback. If the small font isnull
it will be derived from the control font.- Parameters:
controlFont
- used for all controlsmenuFont
- used for the menu bar and menu itemstitleFont
- used for TitledBorder, titles and titled separatorsmessageFont
- used for OptionPanessmallFont
- used for tool tips and similar componentswindowTitleFont
- used for internal frame window titles- Returns:
- a FontSet based on the given fonts
- Throws:
java.lang.NullPointerException
- if the control font isnull
-
getLogicalFontSet
public static FontSet getLogicalFontSet()
Lazily creates and returns the FontSet that returns the logical fonts specified by the Java runtime environment.- Returns:
- a FontSets that uses the logical fonts specified by the Java environment
-
asFontUIResource
static javax.swing.plaf.FontUIResource asFontUIResource(java.awt.Font font)
-
-