List of usage examples for com.jgoodies.looks.plastic Plastic3DLookAndFeel Plastic3DLookAndFeel
public Plastic3DLookAndFeel()
From source file:musite.MusiteMain.java
License:Open Source License
private static void setupLookAndFeel() { try {/*from w w w . j a v a 2 s . c om*/ if (SystemUtils.IS_OS_WINDOWS) { /* * For Windows: just use platform default look & feel. */ UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); } else if (SystemUtils.IS_OS_MAC) { /* * For Mac: move menue bar to OS X default bar (next to Apple * icon) */ System.setProperty("apple.laf.useScreenMenuBar", "true"); } else { /* * For Unix platforms, use JGoodies Looks */ UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); Plastic3DLookAndFeel.set3DEnabled(true); Plastic3DLookAndFeel.setCurrentTheme(new com.jgoodies.looks.plastic.theme.SkyBluer()); Plastic3DLookAndFeel.setTabStyle(Plastic3DLookAndFeel.TAB_STYLE_METAL_VALUE); Plastic3DLookAndFeel.setHighContrastFocusColorsEnabled(true); Options.setDefaultIconSize(new Dimension(18, 18)); Options.setHiResGrayFilterEnabled(true); Options.setPopupDropShadowEnabled(true); Options.setUseSystemFonts(true); UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE); UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); } } catch (Exception e) { e.printStackTrace(); } }
From source file:net.codjo.standalone.client.DbaWindow.java
License:Apache License
private static void configureLookAndFeel() { UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); Options.setGlobalFontSizeHints(FontSizeHints.MIXED); Plastic3DLookAndFeel.setMyCurrentTheme(new ExperienceBlue()); try {/* w ww. j av a2 s.co m*/ UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (UnsupportedLookAndFeelException e) { ; } }
From source file:net.narusas.cafelibrary.ui.LibraryList.java
License:Open Source License
/** * Auto-generated main method to display this JPanel inside a new JFrame. *///from w w w . j a va2 s .c o m public static void main(String[] args) { try { UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (Exception e) { } final Library lib = new Library(); final BookList b1 = new BookList("Book List 1") { public int getBookSize() { return 9999; } }; lib.add(b1); lib.add(new BookList("Book List 2232323232323323232323232323232")); lib.add(new BookList("Book List 3")); lib.add(new BookList("Book List 4")); lib.add(new BookList("Book List 5")); lib.add(new BookList("Book List 6")); lib.add(new BookList("Book List 7")); lib.add(new BookList("Book List 8")); lib.add(new BookList("Book List 9")); lib.add(new BookList("Book List 10")); lib.add(new BookList("Book List 11")); lib.add(new BookList("Book List 12")); lib.add(new BookList("Book List 13")); JFrame frame = new JFrame(); LibraryList bList = new LibraryList(); bList.getListModel().setLibrary(lib); frame.getContentPane().add(bList); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.pack(); frame.setVisible(true); new Thread() { public void run() { try { sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } lib.add(new BookList("Book List 4")); try { sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } lib.remove(b1); } }.start(); }
From source file:net.narusas.ui.component.GridentPanel.java
License:Open Source License
/** * Auto-generated main method to display this JPanel inside a new JFrame. *//* w w w . j ava 2s. c om*/ public static void main(String[] args) { try { UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (Exception e) { } JFrame frame = new JFrame(); GridentPanel p = new GridentPanel(); p.add(new JLabel("ABD")); frame.getContentPane().add(p); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.pack(); frame.setVisible(true); }
From source file:net.rptools.maptool.client.MapTool.java
License:Open Source License
public static void main(String[] args) { try {//ww w . jav a 2s .c o m UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (Exception e) { System.err.println("Exception during look and feel setup: " + e); } // Draw frame contents on resize Toolkit.getDefaultToolkit().setDynamicLayout(true); initialize(); clientFrame.setVisible(true); }
From source file:net.rptools.tokentool.TokenTool.java
License:Open Source License
public static void main(String[] args) { try {// w w w . j ava2 s . c o m UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (Exception e) { System.err.println("Exception during look and feel setup: " + e); } AppSetup.firstTime(); tokenToolFrame = new TokenToolFrame(); tokenToolFrame.setVisible(true); }
From source file:net.sf.jabref.JabRef.java
License:Open Source License
private void setLookAndFeel() { try {//ww w. j a va 2 s . c om String lookFeel; String systemLnF = UIManager.getSystemLookAndFeelClassName(); if (Globals.prefs.getBoolean(JabRefPreferences.USE_DEFAULT_LOOK_AND_FEEL)) { // Use system Look & Feel by default lookFeel = systemLnF; } else { lookFeel = Globals.prefs.get(JabRefPreferences.WIN_LOOK_AND_FEEL); } // At all cost, avoid ending up with the Metal look and feel: if (lookFeel.equals("javax.swing.plaf.metal.MetalLookAndFeel")) { Plastic3DLookAndFeel lnf = new Plastic3DLookAndFeel(); Plastic3DLookAndFeel.setCurrentTheme(new SkyBluer()); com.jgoodies.looks.Options.setPopupDropShadowEnabled(true); UIManager.setLookAndFeel(lnf); } else { try { UIManager.setLookAndFeel(lookFeel); } catch (Exception e) { // javax.swing.UnsupportedLookAndFeelException (sure; see bug #1278) or ClassNotFoundException (unsure) may be thrown // specified look and feel does not exist on the classpath, so use system l&f UIManager.setLookAndFeel(systemLnF); // also set system l&f as default Globals.prefs.put(JabRefPreferences.WIN_LOOK_AND_FEEL, systemLnF); // notify the user JOptionPane.showMessageDialog(JabRef.jrf, Globals.lang( "Unable to find the requested Look & Feel and thus the default one is used."), Globals.lang("Warning"), JOptionPane.WARNING_MESSAGE); } } } catch (Exception e) { e.printStackTrace(); } // In JabRef v2.8, we did it only on NON-Mac. Now, we try on all platforms boolean overrideDefaultFonts = Globals.prefs.getBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONTS); if (overrideDefaultFonts) { int fontSize = Globals.prefs.getInt(JabRefPreferences.MENU_FONT_SIZE); UIDefaults defaults = UIManager.getDefaults(); Enumeration<Object> keys = defaults.keys(); Double zoomLevel = null; while (keys.hasMoreElements()) { Object key = keys.nextElement(); if ((key instanceof String) && (((String) key).endsWith(".font"))) { FontUIResource font = (FontUIResource) UIManager.get(key); if (zoomLevel == null) { // zoomLevel not yet set, calculate it based on the first found font zoomLevel = (double) fontSize / (double) font.getSize(); } font = new FontUIResource(font.getName(), font.getStyle(), fontSize); defaults.put(key, font); } } if (zoomLevel != null) { GUIGlobals.zoomLevel = zoomLevel; } } }
From source file:org.addition.epanet.ui.EpanetUI.java
License:Open Source License
/** * Aware-P Epanet application entry point * * @param args//w w w .ja v a 2 s . c o m * @throws UnsupportedLookAndFeelException * */ public static void main(String[] args) throws UnsupportedLookAndFeelException { // if (Utilities.isMac()) { // System.setProperty("apple.laf.useScreenMenuBar", "true"); // System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Aware-P Epanet"); // // try { // // Class<?> appCl = Class.forName("com.apple.eawt.Application"); // Object app = appCl.getMethod("getApplication", new Class[]{}).invoke(null); // Image dockImage = Toolkit.getDefaultToolkit().getImage(EpanetUI.class.getResource("/uiresources/ae.png")); // appCl.getMethod("setDockIconImage",java.awt.Image.class).invoke(app, dockImage); // JMenuBar menuBar = new JMenuBar(); // JMenu fileMenu = new JMenu("File"); // menuBar.add(fileMenu); // // openAction = new JMenuItem("Open"); // saveAction = new JMenuItem("Save"); // runAction = new JMenuItem("Run"); // // fileMenu.add(openAction); // fileMenu.add(saveAction); // fileMenu.add(runAction); // appCl.getMethod("setDefaultMenuBar",javax.swing.JMenuBar.class).invoke(app,menuBar); // } catch (Exception e) { // throw new RuntimeException(e); // } // } if (Utilities.isMac()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Aware-P Epanet"); try { Class<?> appCl = Class.forName("com.apple.eawt.Application"); Object app = appCl.getMethod("getApplication", new Class[] {}).invoke(null); Image dockImage = Toolkit.getDefaultToolkit() .getImage(EpanetUI.class.getResource("/uiresources/ae.png")); appCl.getMethod("setDockIconImage", java.awt.Image.class).invoke(app, dockImage); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); menuBar.add(fileMenu); openAction = new JMenuItem("Open"); saveAction = new JMenuItem("Save"); runAction = new JMenuItem("Run"); fileMenu.add(openAction); fileMenu.add(saveAction); fileMenu.add(runAction); // appCl.getMethod("setDefaultMenuBar",javax.swing.JMenuBar.class).invoke(app,menuBar); } catch (Exception e) { throw new RuntimeException(e); } } try { UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } new EpanetUI(); }
From source file:org.codehaus.griffon.runtime.lookandfeel.jgoodies.JGoodiesPlastic3DLookAndFeelHandler.java
License:Apache License
public JGoodiesPlastic3DLookAndFeelHandler() { super("Plastic3D", new Plastic3DLookAndFeel()); }
From source file:org.deegree.igeo.desktop.IGeoDesktop.java
License:Open Source License
/** * @param processMonitor/*from ww w . j ava 2 s .c om*/ * * */ public IGeoDesktop(ProcessMonitor processMonitor) { super(processMonitor); try { String manager = System.getProperty("UIManager"); if (manager != null) { UIManager.setLookAndFeel(manager); } else { // UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel"); Plastic3DLookAndFeel laf = new Plastic3DLookAndFeel(); ExperienceBlue eb = new ExperienceBlue(); PlasticLookAndFeel.setPlasticTheme(eb); UIManager.setLookAndFeel(laf); } } catch (Exception e) { LOG.logError("Could not load LookAndFeel: " + System.getProperty("UIManager"), e); } }