Example usage for com.jgoodies.looks Options USE_SYSTEM_FONTS_KEY

List of usage examples for com.jgoodies.looks Options USE_SYSTEM_FONTS_KEY

Introduction

In this page you can find the example usage for com.jgoodies.looks Options USE_SYSTEM_FONTS_KEY.

Prototype

String USE_SYSTEM_FONTS_KEY

To view the source code for com.jgoodies.looks Options USE_SYSTEM_FONTS_KEY.

Click Source Link

Document

A convenience constant for the standard Swing system property key that configures the use of system fonts.

Usage

From source file:de.maklerpoint.office.Gui.CRMView.java

License:Open Source License

/**
 * /*from   w ww . j  a v  a2s.  c  om*/
 * @param uiTheme
 */
public final void configureUI(String uiTheme) {
    UIManager.put(Options.USE_SYSTEM_FONTS_KEY, Boolean.TRUE);
    Options.setDefaultIconSize(new Dimension(18, 18));

    if (uiTheme == null) {
        uiTheme = UIManager.getSystemLookAndFeelClassName();
    }

    //            uiTheme = LookUtils.IS_OS_WINDOWS_XP ? Options.getCrossPlatformLookAndFeelClassName()
    //                    : Options.getSystemLookAndFeelClassName();

    try {
        UIManager.setLookAndFeel(uiTheme);
        //            SwingUtilities.updateComponentTreeUI(super.getComponent());
        SwingUtilities.updateComponentTreeUI(CRMView.super.getFrame());
        //            SwingUtilities.updateComponentTreeUI(CRMView.super.getRootPane().getJMenuBar());
    } catch (Exception ex) {
        Log.logger.fatal("Fehler: Konnte das Theme \"" + uiTheme + "\" nicht aktivieren", ex);
        ShowException.showException(
                "Konnte das graphische Theme nicht aktivieren. Eventuell"
                        + " untersttzt Ihr Betriebssystem das gewhlte Theme nicht.",
                ExceptionDialogGui.LEVEL_WARNING, ex, "Schwerwiegend: Konnte Theme nicht aktivieren");

    }
}