| java.lang.Object org.jvnet.substance.fonts.FontPolicies
FontPolicies | final public class FontPolicies (Code) | | Provides predefined FontPolicy implementations.
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.
author: Karsten Lentzsch version: $Revision: 1.2 $ See Also: FontPolicy See Also: FontSet See Also: FontSets See Also: Fonts since: 2.0 |
Method Summary | |
public static FontPolicy | createFixedPolicy(FontSet fontSet) Returns a font policy that in turn always returns the specified FontSet.
The FontSet will be fixed, but the FontSet itself may
return different fonts in different environments. | public 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.
If no custom settings are available, the given default policy will
be used to look up the FontSet. | public static FontPolicy | getDefaultPlasticOnWindowsPolicy() Returns the default font policy for Plastic on the Windows platform. | public static FontPolicy | getDefaultPlasticPolicy() Returns the default Plastic FontPolicy that may vary
with the platform and environment. | public static FontPolicy | getDefaultWindowsPolicy() Returns the default font policy for the Windows platform. | public static FontPolicy | getLogicalFontsPolicy() Returns a font policy that returns the logical fonts
as specified by the Java runtime environment. | public 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. | public 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. | public 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. |
createFixedPolicy | public static FontPolicy createFixedPolicy(FontSet fontSet)(Code) | | Returns a font policy that in turn always returns the specified FontSet.
The FontSet will be fixed, but the FontSet itself may
return different fonts in different environments.
Parameters: fontSet - the FontSet to be return by this policy a font policy that returns the specified FontSet. |
customSettingsPolicy | public static FontPolicy customSettingsPolicy(FontPolicy defaultPolicy)(Code) | | Returns a font policy that checks for a custom FontPolicy
and a custom FontSet specified in the System settings or UIManager.
If no custom settings are available, the given default policy will
be used to look up the FontSet.
Parameters: defaultPolicy - the policy used if there are no custom settings a FontPolicy that checks for custom settingsbefore the default policy is returned. |
getDefaultPlasticOnWindowsPolicy | public static FontPolicy getDefaultPlasticOnWindowsPolicy()(Code) | | Returns the default font policy for Plastic on the Windows platform.
It differs from the default Windows policy in that it uses a bold font
for TitledBorders, titles, and titled separators.
the default font policy for Plastic on the Windows platform. |
getDefaultPlasticPolicy | public static FontPolicy getDefaultPlasticPolicy()(Code) | | Returns the default Plastic FontPolicy that may vary
with the platform and environment.
On Windows, the PlasticOnWindowsPolicy is returned that
is much like the defualt WindowsPolicy but uses a bold title font.
On other Platforms, the logical fonts policy is returned
that uses the logical fonts as specified by the Java runtime environment.
a Windows-like policy on Windows, a logical fonts policy on all other platforms |
getDefaultWindowsPolicy | public static FontPolicy getDefaultWindowsPolicy()(Code) | | Returns the default font policy for the Windows platform.
It aims to return a FontSet that is close to the native guidelines
and useful for the current Java environment.
The control font scales with the platform screen resolution
(96dpi/101dpi/120dpi/144dpi/...) and honors the desktop font settings
(normal/large/extra large).
the default font policy for the Windows platform. |
getLogicalFontsPolicy | public static FontPolicy getLogicalFontsPolicy()(Code) | | Returns a font policy that returns the logical fonts
as specified by the Java runtime environment.
a font policy that returns logical fonts. |
getLooks1xPlasticPolicy | public static FontPolicy getLooks1xPlasticPolicy()(Code) | | Returns a font policy for getting a Plastic appearance that aims to be
visual backward compatible with the JGoodies Looks version 1.x.
It uses a font choice similar to the choice implemented
by the Plastic L&fs in the JGoodies Looks version 1.x.
a font policy that aims to reproduce the Plastic font choicein the JGoodies Looks 1.x. |
getLooks1xWindowsPolicy | public static FontPolicy getLooks1xWindowsPolicy()(Code) | | Returns a font policy for getting a Windows appearance that aims to be
visual backward compatible with the JGoodies Looks version 1.x.
It uses a font choice similar to the choice implemented
by the Windows L&f in the JGoodies Looks version 1.x.
a font policy that aims to reproduce the Windows font choicein the JGoodies Looks 1.x. |
getTransitionalPlasticPolicy | public static FontPolicy getTransitionalPlasticPolicy()(Code) | | Returns a font policy intended for API users that want to
move Plastic code from the Looks 1.x to the Looks 2.0.
On Windows, it uses the Looks 2.0 Plastic fonts,
on other platforms it uses the Looks 1.x Plastic fonts.
the recent Plastic font policy on Windows,the JGoodies Looks 1.x on other Platforms. |
|
|