List of usage examples for com.jgoodies.looks Options getSystemLookAndFeelClassName
public static String getSystemLookAndFeelClassName()
From source file:de.maklerpoint.office.Gui.CRMView.java
License:Open Source License
private void plasticMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_plasticMenuItemActionPerformed String name = LookUtils.IS_OS_WINDOWS_XP ? Options.getCrossPlatformLookAndFeelClassName() : Options.getSystemLookAndFeelClassName(); configureUI(name);// w w w .j ava 2s.c om }
From source file:de.xplib.xdbm.ui.Settings.java
License:Open Source License
/** * GoF Factory method.//from w w w. j a va 2s .c o m * * @return A <code>Settings</code> instance. */ public static Settings createDefault() { Settings settings = new Settings(); //settings.setSelectedLookAndFeel(new PlasticXPLookAndFeel()); settings.setSelectedLookAndFeel(new Plastic3DLookAndFeel()); //settings.setSelectedTheme(PlasticLookAndFeel.createMyDefaultTheme()); settings.setSelectedTheme(new SkyBluerTahoma()); settings.setUseSystemFonts(Boolean.TRUE); settings.setFontSizeHints(FontSizeHints.MIXED); settings.setUseNarrowButtons(false); settings.setTabIconsEnabled(true); settings.setPlasticTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE); settings.setPlasticHighContrastFocusEnabled(false); settings.setMenuBarHeaderStyle(null); settings.setMenuBarPlasticBorderStyle(null); settings.setMenuBarWindowsBorderStyle(null); settings.setMenuBar3DHint(Boolean.TRUE); settings.setToolBarHeaderStyle(null); settings.setToolBarPlasticBorderStyle(null); settings.setToolBarWindowsBorderStyle(null); settings.setToolBar3DHint(Boolean.TRUE); settings.setPopupDropShadowEnabled(Boolean.TRUE); String name = LookUtils.IS_OS_WINDOWS_XP ? Options.getCrossPlatformLookAndFeelClassName() : Options.getSystemLookAndFeelClassName(); try { settings.setSelectedLookAndFeel((LookAndFeel) Class.forName(name).newInstance()); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } return settings; }
From source file:net.dpml.depot.prefs.DepotPreferencesFrame.java
License:Apache License
private void configureUI() { UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); Options.setGlobalFontSizeHints(FontSizeHints.MIXED); Options.setDefaultIconSize(new Dimension(18, 18)); String lafName = LookUtils.IS_OS_WINDOWS_XP ? Options.getCrossPlatformLookAndFeelClassName() : Options.getSystemLookAndFeelClassName(); com.jgoodies.looks.plastic.PlasticLookAndFeel .setMyCurrentTheme(new com.jgoodies.looks.plastic.theme.SkyBlue()); try {//from w w w.ja v a 2s .co m UIManager.setLookAndFeel(lafName); } catch (Exception e) { System.err.println("Can't set look & feel:" + e); } }
From source file:net.sf.housekeeper.util.PlatformAwareUIConfigurer.java
License:Open Source License
public void afterPropertiesSet() throws Exception { if (configurer == null) { configurer = new UIManagerConfigurer(); }//from w ww. j a v a 2 s. c o m if (LookUtils.IS_OS_WINDOWS) { LOG.info("Windows detected"); setLookAndFeel(Options.JGOODIES_WINDOWS_NAME); } else if (isOS((MAC_OS_X))) { LOG.info("Macintosh OS X detected"); setLookAndFeel(Options.getSystemLookAndFeelClassName()); } else { setLookAndFeel(Options.PLASTICXP_NAME); } }
From source file:org.neugen.gui.NeuGenApp.java
License:Open Source License
/** At startup create and show the main frame of the application. */ @Override/*from ww w. j a va 2 s . c o m*/ protected void startup() { //UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); //Options.setDefaultIconSize(new Dimension(18, 18)); String lafName = LookUtils.IS_OS_WINDOWS ? Options.getCrossPlatformLookAndFeelClassName() : Options.getSystemLookAndFeelClassName(); try { UIManager.setLookAndFeel(lafName); logger.info("Look and feel name: " + lafName); } catch (Exception e) { logger.error("Can't set look & feel:" + e, e); } /* PlasticLookAndFeel.setPlasticTheme(new DesertBlue()); try { UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (Exception e) { } * */ NeuGenView ngView = new NeuGenView(this); ngView.getFrame().setLocationRelativeTo(null); NeuGenView.setInstance(ngView); show(ngView); }
From source file:org.qi4j.envisage.Envisage.java
License:Apache License
private void initLookAndFeel() { String osName = System.getProperty("os.name").toUpperCase(); // set to use swing anti alias text only for JVM <= 1.5 System.setProperty("swing.aatext", "true"); // set default swing bold to false, only for JVM 1.5 or above UIManager.put("swing.boldMetal", Boolean.FALSE); // set LaF// ww w. jav a 2 s.com LookAndFeel lnf = UIManager.getLookAndFeel(); if (lnf != null && lnf.getID().equalsIgnoreCase("Metal")) { final String lnfClassName; if (osName.startsWith("MAC")) { System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Envisage"); //TODO i18n System.setProperty("apple.laf.useScreenMenuBar", "true"); lnfClassName = UIManager.getSystemLookAndFeelClassName(); } else if (osName.startsWith("WINDOWS")) { UIManager.put("ClassLoader", LookUtils.class.getClassLoader()); lnfClassName = Options.getSystemLookAndFeelClassName(); Options.setUseNarrowButtons(false); } else { UIManager.put("ClassLoader", LookUtils.class.getClassLoader()); lnfClassName = Options.getCrossPlatformLookAndFeelClassName(); PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_METAL_VALUE); PlasticLookAndFeel.setPlasticTheme(new ExperienceBlue()); Options.setUseNarrowButtons(false); //PlasticLookAndFeel.setMyCurrentTheme(new ExperienceBlueDefaultFont()); // for CJK Font } if (lnfClassName != null) { try { UIManager.setLookAndFeel(lnfClassName); } catch (Exception ex) { System.err.println("Unable to set LookAndFeel, use default LookAndFeel.\n" + ex.getMessage()); } } } }
From source file:progresswatcher.GuiHelper.java
License:Open Source License
/** * Set a new look and feel/*from www. jav a2 s . com*/ */ public static void configureUI() { UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); Options.setDefaultIconSize(new Dimension(18, 18)); String lafName = LookUtils.IS_OS_WINDOWS_XP ? Options.getCrossPlatformLookAndFeelClassName() : Options.getSystemLookAndFeelClassName(); try { UIManager.setLookAndFeel(lafName); } catch (Exception e) { System.err.println("Can't set look & feel:" + e); } }