Class DefaultKDEFontPolicy
java.lang.Object
org.pushingpixels.radiance.common.internal.font.DefaultKDEFontPolicy
- All Implemented Interfaces:
FontPolicy
The default font policy for KDE OS.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetFileContent(String fileName) Looks up and returns a set of fonts that will be used by a Look&Feel to set the default fonts for its components.private StringgetIniParam(String content, String category, String param) private FontSetprivate static booleanChecks for KDE4 flags in current env.static booleanmethod to check if current user session is KDE
-
Field Details
-
SANS_SERIF
- See Also:
-
fontSet
-
-
Constructor Details
-
DefaultKDEFontPolicy
public DefaultKDEFontPolicy()
-
-
Method Details
-
isKDERunning
public static boolean isKDERunning()method to check if current user session is KDE- Returns:
trueif KDE session is currently running.
-
isKDE4Running
private static boolean isKDE4Running()Checks for KDE4 flags in current env. There are few possible flags:
KDE_SESSION_VERSION=4<br/> DESKTOP_SESSION=kde4<br/>If distro for some readon don't set this flags - KDE3 is possibli running.
There is one more way to determine current KDE version. We can run"konsole --version"command and parse output, but KDE3 don't have own env flags, so this command will run every time we using KDE3.- Returns:
trueif KDE4 env flags found,falseotherwise.
-
getFontSet
Description copied from interface:FontPolicyLooks up and returns a set of fonts that will be used by a Look&Feel to set the default fonts for its components.This method is invoked during the L&F component initialization.
- Specified by:
getFontSetin interfaceFontPolicy- Returns:
- a set of fonts used as default for the component.
-
getInternalFontSet
-
getIniParam
-
getFileContent
- Throws:
IOException
-