com.jgoodies.looks
public final class FontPolicies extends Object
Note: The available policies work well on Windows. On other platforms the fonts specified by the runtime environment are chosen. I plan to provide more logic or options for other platforms, for example that a Linux system checks for a Tahoma or Segoe UI.
TODO: Add a check for a custom font policy set in the System properties.
TODO: Add policies that emulate different Windows setups: default XP on 96dpi with normal fonts ("XP-normal-96"), Vista on 120dpi with large fonts ("Vista-large-120"), etc.
Since: 2.0
Version: $Revision: 1.8 $
See Also: FontPolicy FontSet FontSets
Method Summary | |
---|---|
static FontPolicy | createFixedPolicy(FontSet fontSet)
Returns a font policy that in turn always returns the specified FontSet.
|
static FontPolicy | customSettingsPolicy(FontPolicy defaultPolicy)
Returns a font policy that checks for a custom FontPolicy
and a custom FontSet specified in the System settings or UIManager.
|
static FontPolicy | getDefaultPlasticOnWindowsPolicy()
Returns the default font policy for Plastic on the Windows platform.
|
static FontPolicy | getDefaultPlasticPolicy()
Returns the default Plastic FontPolicy that may vary
with the platform and environment.
|
static FontPolicy | getDefaultWindowsPolicy()
Returns the default font policy for the Windows platform.
|
static FontPolicy | getLogicalFontsPolicy()
Returns a font policy that returns the logical fonts
as specified by the Java runtime environment.
|
static FontPolicy | getLooks1xPlasticPolicy()
Returns a font policy for getting a Plastic appearance that aims to be
visual backward compatible with the JGoodies Looks version 1.x.
|
static FontPolicy | getLooks1xWindowsPolicy()
Returns a font policy for getting a Windows appearance that aims to be
visual backward compatible with the JGoodies Looks version 1.x.
|
static FontPolicy | getTransitionalPlasticPolicy()
Returns a font policy intended for API users that want to
move Plastic code from the Looks 1.x to the Looks 2.0.
|
Parameters: fontSet the FontSet to be return by this policy
Returns: a font policy that returns the specified FontSet.
Parameters: defaultPolicy the policy used if there are no custom settings
Returns: a FontPolicy that checks for custom settings before the default policy is returned.
Returns: the default font policy for Plastic on the Windows platform.
Returns: a Windows-like policy on Windows, a logical fonts policy on all other platforms
The control font scales with the platform screen resolution (96dpi/101dpi/120dpi/144dpi/...) and honors the desktop font settings (normal/large/extra large).
Returns: the default font policy for the Windows platform.
Returns: a font policy that returns logical fonts.
Returns: a font policy that aims to reproduce the Plastic font choice in the JGoodies Looks 1.x.
Returns: a font policy that aims to reproduce the Windows font choice in the JGoodies Looks 1.x.
Returns: the recent Plastic font policy on Windows, the JGoodies Looks 1.x on other Platforms.