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 String
getFileContent
(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 String
getIniParam
(String content, String category, String param) private FontSet
private static boolean
Checks for KDE4 flags in current env.static boolean
method 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:
true
if 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:
true
if KDE4 env flags found,false
otherwise.
-
getFontSet
Description copied from interface:FontPolicy
Looks 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:
getFontSet
in interfaceFontPolicy
- Returns:
- a set of fonts used as default for the component.
-
getInternalFontSet
-
getIniParam
- Throws:
Exception
-
getFileContent
- Throws:
IOException
-