List of usage examples for com.jgoodies.looks.plastic PlasticXPLookAndFeel PlasticXPLookAndFeel
public PlasticXPLookAndFeel()
From source file:com.frinika.simphoney.Simphoney2Main.java
License:Open Source License
private static void configureUI() { String lcOSName = System.getProperty("os.name").toLowerCase(); boolean MAC_OS_X = lcOSName.startsWith("mac os x"); if (MAC_OS_X) { configureUI_MacOS();// w ww . ja v a 2 s.com return; } try { UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); } catch (Exception e) { e.printStackTrace(); } }
From source file:com.jtstand.swing.MainFrame.java
License:Open Source License
public static void setLookAndFeel() { try {/*from ww w . ja v a2s .c om*/ // String crosslaf = UIManager.getCrossPlatformLookAndFeelClassName(); // System.out.println("Cross Platfowm Look & Feel:" + crosslaf); String systemlaf = UIManager.getSystemLookAndFeelClassName(); // System.out.println("System Look & Feel:" + systemlaf); String nimbus = null; String windows = null; LookAndFeelInfo[] lafis = UIManager.getInstalledLookAndFeels(); log.info("Installed Look & Feels:"); for (int i = 0; i < lafis.length; i++) { LookAndFeelInfo lafi = lafis[i]; String name = lafi.getName(); log.info("[" + i + "]=" + name); if ("Nimbus".equals(name)) { nimbus = lafi.getClassName(); } else if ("Windows".equals(name)) { windows = lafi.getClassName(); } } // if (windows != null) { // UIManager.setLookAndFeel(windows); // return; // } UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); FontSet fontSet = FontSets.createDefaultFontSet( // new Font("Tahoma", Font.PLAIN, 11), // control font // new Font("Tahoma", Font.PLAIN, 11), // menu font // new Font("Tahoma", Font.PLAIN, 11) // title font // new Font("Sans", Font.PLAIN, 11), // control font // new Font("Sans", Font.PLAIN, 11), // menu font // new Font("Sans", Font.PLAIN, 11) // title font new Font("Verdana", Font.PLAIN, 12), // control font new Font("Verdana", Font.PLAIN, 12), // menu font new Font("Verdana", Font.PLAIN, 12) // title font ); FontPolicy fixedPolicy = FontPolicies.createFixedPolicy(fontSet); PlasticXPLookAndFeel.setFontPolicy(fixedPolicy); UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); // System.out.println("getControlTextFont:" + PlasticXPLookAndFeel.getControlTextFont()); // System.out.println("getTitleTextFont:" + PlasticXPLookAndFeel.getTitleTextFont()); // System.out.println("getMenuTextFont:" + PlasticXPLookAndFeel.getMenuTextFont()); // System.out.println("getPlasticTheme:" + PlasticXPLookAndFeel.getPlasticTheme()); // UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); //UIManager.setLookAndFeel(systemlaf); } catch (Exception ex) { log.error("Exception", ex); } }
From source file:com.mirth.connect.client.ui.Mirth.java
License:Open Source License
public static void initUIManager() { try {//from w w w. jav a 2 s .c o m PlasticLookAndFeel.setPlasticTheme(new MirthTheme()); PlasticXPLookAndFeel look = new PlasticXPLookAndFeel(); UIManager.setLookAndFeel(look); UIManager.put("win.xpstyle.name", "metallic"); LookAndFeelAddons.setAddon(WindowsLookAndFeelAddons.class); /* * MIRTH-1225 and MIRTH-2019: Create alternate key bindings if CTRL is not the same as * the menu shortcut key (i.e. COMMAND on OSX) */ if (InputEvent.CTRL_MASK != Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) { createAlternateKeyBindings(); } if (SystemUtils.IS_OS_MAC) { OSXAdapter.setAboutHandler(Mirth.class, Mirth.class.getDeclaredMethod("aboutMac", (Class[]) null)); OSXAdapter.setQuitHandler(Mirth.class, Mirth.class.getDeclaredMethod("quitMac", (Class[]) null)); } } catch (Exception e) { e.printStackTrace(); } // keep the tooltips from disappearing ToolTipManager.sharedInstance().setDismissDelay(3600000); // TabbedPane defaults // UIManager.put("TabbedPane.selected", new Color(0xffffff)); // UIManager.put("TabbedPane.background",new Color(225,225,225)); // UIManager.put("TabbedPane.tabAreaBackground",new Color(225,225,225)); UIManager.put("TabbedPane.highlight", new Color(225, 225, 225)); UIManager.put("TabbedPane.selectHighlight", new Color(0xc3c3c3)); UIManager.put("TabbedPane.contentBorderInsets", new InsetsUIResource(0, 0, 0, 0)); // TaskPane defaults UIManager.put("TaskPane.titleBackgroundGradientStart", new Color(0xffffff)); UIManager.put("TaskPane.titleBackgroundGradientEnd", new Color(0xffffff)); // Set fonts UIManager.put("TextPane.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ToggleButton.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("Panel.font", UIConstants.DIALOG_FONT); UIManager.put("PopupMenu.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("OptionPane.font", UIConstants.DIALOG_FONT); UIManager.put("Label.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("Tree.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ScrollPane.font", UIConstants.DIALOG_FONT); UIManager.put("TextField.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("Viewport.font", UIConstants.DIALOG_FONT); UIManager.put("MenuBar.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("FormattedTextField.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("DesktopIcon.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("TableHeader.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ToolTip.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("PasswordField.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("TaskPane.font", UIConstants.TEXTFIELD_BOLD_FONT); UIManager.put("Table.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("TabbedPane.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ProgressBar.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("CheckBoxMenuItem.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ColorChooser.font", UIConstants.DIALOG_FONT); UIManager.put("Button.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("TextArea.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("Spinner.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("RadioButton.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("TitledBorder.font", UIConstants.TEXTFIELD_BOLD_FONT); UIManager.put("EditorPane.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("RadioButtonMenuItem.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ToolBar.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("MenuItem.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("CheckBox.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("JXTitledPanel.title.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("Menu.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("ComboBox.font", UIConstants.TEXTFIELD_PLAIN_FONT); UIManager.put("JXLoginPanel.banner.font", UIConstants.BANNER_FONT); UIManager.put("List.font", UIConstants.TEXTFIELD_PLAIN_FONT); InputMap im = (InputMap) UIManager.get("Button.focusInputMap"); im.put(KeyStroke.getKeyStroke("pressed ENTER"), "pressed"); im.put(KeyStroke.getKeyStroke("released ENTER"), "released"); try { UIManager.put("wizard.sidebar.image", ImageIO.read(com.mirth.connect.client.ui.Frame.class.getResource("images/wizardsidebar.png"))); } catch (IOException e) { e.printStackTrace(); } }
From source file:com.mirth.connect.manager.ManagerDialog.java
License:Open Source License
public ManagerDialog() { try {//ww w .j av a2s . c om PlasticLookAndFeel.setPlasticTheme(new MirthTheme()); PlasticXPLookAndFeel look = new PlasticXPLookAndFeel(); UIManager.setLookAndFeel(look); UIManager.put("win.xpstyle.name", "metallic"); LookAndFeelAddons.setAddon(WindowsLookAndFeelAddons.class); getContentPane().setBackground(Color.WHITE); setTitle("Mirth Connect Server Manager"); setResizable(false); serviceController = ServiceControllerFactory.getServiceController(); managerController = ManagerController.getInstance(); heapSize = (String) managerController.getServerProperties() .getProperty(ManagerConstants.ADMINISTRATOR_MAX_HEAP_SIZE); } catch (Exception e) { e.printStackTrace(); System.exit(1); } }
From source file:com.mrfeinberg.babelizer.app.BabelizerMain.java
License:Apache License
public static void main(final String[] args) { try {/*from w w w. j ava 2 s . com*/ if (System.getProperty("os.name").toLowerCase().startsWith("win")) { UIManager.put("ClassLoader", LookUtils.class.getClassLoader()); PlasticLookAndFeel.setPlasticTheme(new ExperienceBlue()); UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); } } catch (final Exception e) { System.err.println(e); } new BabelizerMain(); }
From source file:de.dal33t.powerfolder.test.ui.TestActivityVisualizationWorker.java
License:Open Source License
/** * @param args/*from w ww . j a v a 2s . c o m*/ */ public static void main(String[] args) { try { // Set l&f UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } final JFrame frame = new JFrame(); frame.setIconImage(Icons.getImageById(Icons.SMALL_LOGO)); frame.setPreferredSize(new Dimension(200, 100)); frame.setLocation(500, 500); JButton startButton = new JButton("Start working"); startButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { MyWorker worker = new MyWorker(frame); worker.start(); } }); frame.getContentPane().add(startButton); frame.pack(); frame.setVisible(true); }
From source file:de.luschny.apps.factorial.BenchmarkApplication.java
License:Open Source License
public static void main(String args[]) { if (System.getProperty("java.version").compareTo("1.8") < 0) { System.out.println("This program requires Java 1.8 or later."); System.out.println("You can download Java 1.8 from http://java.sun.com"); return;//from w ww . ja v a2 s .c o m } try { UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); } catch (Exception ignored) { } java.awt.EventQueue.invokeLater(() -> new BenchmarkForm().setVisible(true)); }
From source file:de.modlab.smilib.gui.HelpFrame.java
License:Open Source License
/** Creates new form HelpFrame */ public HelpFrame() { //custom look and feel PlasticLookAndFeel.setPlasticTheme(new ExperienceRoyale()); try {/* www . j a v a 2s . com*/ UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } initComponents(); this.setVisible(false); this.center(); }
From source file:de.modlab.smilib.gui.SmiLibFrame.java
License:Open Source License
/** * Creates new form SmiLibFrame//from ww w . j ava 2s. c om */ public SmiLibFrame() { //third party look and feel PlasticLookAndFeel.setPlasticTheme(new ExperienceRoyale()); try { UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } //init this.initComponents(); //custom panels are added this.addCustomComponents(); //frame gets centered this.center(); //frame gets shown this.setVisible(true); //init of message box messageBox = new javax.swing.JOptionPane(); }
From source file:etomica.virial.cluster2.mvc.view.JGoodiesSettings.java
License:Mozilla Public License
public static JGoodiesSettings createDefault() { JGoodiesSettings settings = new JGoodiesSettings(); settings.setSelectedLookAndFeel(new PlasticXPLookAndFeel()); settings.setSelectedTheme(PlasticLookAndFeel.createMyDefaultTheme()); settings.setUseNarrowButtons(true);// w w w . j a v a 2 s .c o m settings.setTabIconsEnabled(true); settings.setPlasticTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE); settings.setPlasticHighContrastFocusEnabled(false); settings.setPopupDropShadowEnabled(null); settings.setMenuBarHeaderStyle(null); settings.setMenuBarPlasticBorderStyle(null); settings.setMenuBarWindowsBorderStyle(null); settings.setMenuBar3DHint(null); settings.setToolBarHeaderStyle(null); settings.setToolBarPlasticBorderStyle(null); settings.setToolBarWindowsBorderStyle(null); settings.setToolBar3DHint(null); return settings; }