List of usage examples for com.jgoodies.looks Options USE_SYSTEM_FONTS_APP_KEY
String USE_SYSTEM_FONTS_APP_KEY
To view the source code for com.jgoodies.looks Options USE_SYSTEM_FONTS_APP_KEY.
Click Source Link
From source file:uk.nhs.cfh.dsp.srth.desktop.appservice.utils.LookAndFeelUtils.java
License:Apache License
/** * Sets the default lnf.//w w w . j a v a2 s .c om */ public static void setDefaultLNF() { UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); Options.setDefaultIconSize(new Dimension(dim, dim)); String lafName = Options.getCrossPlatformLookAndFeelClassName(); // set look and feel if (LookUtils.IS_OS_WINDOWS || LookUtils.IS_OS_MAC) { lafName = UIManager.getSystemLookAndFeelClassName(); } logger.info("Setting look and feel to : " + lafName); // set the look n feel try { UIManager.setLookAndFeel(lafName); LookAndFeelFactory.installDefaultLookAndFeel(); LookAndFeelFactory.installDefaultLookAndFeelAndExtension(); } catch (Exception e) { logger.warning("Nested exception is : " + e.fillInStackTrace()); } }
From source file:xapps.browser.api.MostMain.java
License:Open Source License
/** * Class Constructor./* w w w . j a va2 s . c o m*/ */ public void setLnF() { try { // Set the look and feel early // Java Web Start // If you use a third party l&f in a network launchable environment such as Java Web Start, you must indicate where to find the l&f classes: UIManager.put("ClassLoader", LookUtils.class.getClassLoader()); try { if (!SystemUtils.isMac()) { PlasticXPLookAndFeel.setMyCurrentTheme(new ExperienceBlue()); UIManager.setLookAndFeel(new com.jgoodies.looks.plastic.PlasticXPLookAndFeel()); //UIManager.setLookAndFeel(new com.jgoodies.looks.)); //PlasticLookAndFeel.setMyCurrentTheme(new Silver()); //UIManager.setLookAndFeel(new com.jgoodies.looks.plastic.PlasticLookAndFeel()); } } catch (Throwable t) { t.printStackTrace(); } //UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); //UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel"); //UIManager.setLookAndFeel("com.jgoodies.looks.plastic.ExtWindowsLookAndFeel"); // PlasticXPLookAndFeel.setMyCurrentTheme(new DarkStar()); //PlasticXPLookAndFeel.setMyCurrentTheme(new DesertBlue()); // Some UI tweaks thanks to jgoodies suggestions // You can force the JGoodies looks and the 1.4 versions of the // // Sun looks to use system fonts using a String key, or JGoodies constant: UIManager.put("Application.useSystemFontSettings", Boolean.TRUE); UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); // In Microsoft environments that use Tahoma as dialog font, you can // tweak the choosen font sizes by setting optional JGoodies font size hints. The global hints can be overriden by look-specific hints: Options.setUseSystemFonts(true); // @note api deprecated jgoodies 2.0 feb 2006 //setGlobalFontSizeHints(FontSizeHints.MIXED); // Dont know if the font stuff actualy did anything!! //You can choose between two styles for Plastic focus colors: low vs. high contrast; // the default is low. You can choose one of: //PlasticXPLookAndFeel.setHighContrastFocusColorsEnabled(true); // lthough ClearLook will typlically improve the appearance of your application, // it may lead to incompatible layout, and so, it is switched off by default. // You can switch it on, enable a verbose mode, which will log reports about // the performed modifications to the console or use the debug mode. In debug mode, // ClearLook will mark decorations that it has identified as visual clutter using saturated colors. //ClearLookManager.setMode(ClearLookMode.DEBUG); // enable tooltips application wide ToolTipManager.sharedInstance().setEnabled(true); // make tooltips persist for a wee bit longer than the default ToolTipManager.sharedInstance().setDismissDelay(15 * 1000); } catch (Exception e) { e.printStackTrace(); } }