New Dark Theme for Nimbus in NetBeans IDE

A brand new plugin by the NetBeans Team's window system guru Stan Aubrecht:

http://plugins.netbeans.org/plugin/46003/?show=true

Dark theme for Nimbus Look and Feel. It goes well with "Norway Today" editor color scheme. It does not affect other look and feel implementations so you must force Nimbus l&f, i.e., by using --laf Nimbus command line switch. To revert back to the default Nimbus theme just uninstall this module.

In Stan's words, this is a "poor man's" solution. There are some area that would need more tweaking, e.g., the top bar in the Options window. But it would mean changing code in NetBeans. This new module just adjust a few UIManager constants.

I think this is also interesting for any other application based on the NetBeans Platform, especially since the sources are available in the contrib repository:

http://hg.netbeans.org/main/contrib/file/25a8acfe62f4/nimbus.theme

In particular, look at the ModuleInstall class:

http://hg.netbeans.org/main/contrib/file/25a8acfe62f4/nimbus.theme/src/org/netbeans/modules/nimbus/theme/Installer.java

Patches and tweaks are welcome.

Note: You need a very recent build of NetBeans IDE, i.e., NetBeans IDE 7.3 Beta 2 is not recent enough. It needs to be more recent than that, i.e., download the latest NetBeans IDE 7.3 development build to try out this plugin.

Comments:

Hello all

I'm currently develop a CAD software based on Netbeans RCP + JavaFX + JMonkeyEngine.

I use JavaFX to create a MS Ribbon 2010 like toolbar, and was dealing with nimbus color for a black theming near "Blender colors".

So i've created a module dealing with Nimbus consts, you can fine the resulat at (except for the ribbon, just the ide because i've applied it to netbeans for working with :-) ) :

https://docs.google.com/file/d/0B2FzLWvthUhjVWpzNjRNM2V6Qk0/edit

this is my module code for Nimbus black theming, as usual in the installer :

public class Installer extends ModuleInstall {

@Override
public void restored() {
try {
//set Nimbus Look And Feel
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
//to nod display tabs
UIManager.put("EditorTabDisplayerUI", "icare.ui.tweak.tab.NoTabsTabDisplayerUI");
//because Nimbus LAF do not use opaque option, force it to allow painting of custom tab.
//UIManager.put("TabbedPane.tabsOpaque", true);

//set Nimbus LAF primary colors
UIManager.put("control", new Color(114,114,114));
UIManager.put("nimbusBase", new Color(64,64,64));
UIManager.put("nimbusFocus", new Color(191,191,191));
UIManager.put("nimbusLightBackground", new Color(176,176,176));
UIManager.put("nimbusSelectionBackground", new Color(90,130,195));
UIManager.put("text", new Color(0,0,0));

} catch (ClassNotFoundException ex) {
Exceptions.printStackTrace(ex);
} catch (InstantiationException ex) {
Exceptions.printStackTrace(ex);
} catch (IllegalAccessException ex) {
Exceptions.printStackTrace(ex);
} catch (UnsupportedLookAndFeelException ex) {
Exceptions.printStackTrace(ex);
}
}
}

need some tweak, but efficient enough for me, and works with netbeans 7.2.1 in less than five minutes (create the module, copy the code, install the nbm in netbeans ide and voilà !).

Hope this will usefull also !

Posted by guest on January 13, 2013 at 02:50 AM PST #

That's a nice looking theme! Out of interest, what's the reasoning behind the need for a recent 7.3 build? Is Nimbus going to be better supported with NB 7.3? I'd like to use it more, but find it throws exceptions and doesn't properly load on some occassions due to NB doing things off the EDT.

It is possible to alter the options window top bar without changing code in NetBeans itself - see http://praxisintermedia.wordpress.com/2011/09/29/the-dark-arts-of-netbeans-hackery/ (hack #3) It would need altering for Nimbus (it currently works for Metal-based LAFs) but that wouldn't be too hard to do. Inserting custom UI delegates is a slightly hacky but useful way of getting around the few things in NB that are not set up for theming.

Best wishes, Neil

Posted by Neil C Smith on January 14, 2013 at 06:46 AM PST #

Hi Neil, no, it's just that's where Stan created the module in, i.e., in 7.3. You can just take the ModuleInstall class he's got, referred to above, and use that for Praxis.

Posted by Geertjan on January 14, 2013 at 06:55 AM PST #

Hi Geertjan, I was actually more thinking about using this in the IDE than in Praxis LIVE (not that I wouldn't consider a switch in future). However, this bug http://netbeans.org/bugzilla/show_bug.cgi?id=174500 still seems to be an issue for me on occasion, and judging from the number of duplicates I may not be the only one!

Posted by Neil C Smith on January 14, 2013 at 07:27 AM PST #

Neil, it says there quite clearly at the end: "there are no exception reports from nb 7.0 nor from recent dev builds. closing."

You seem to have a different experience, so why not go to that issue and indicate that -- with steps to reproduce and with all the details about your environment?

Posted by Geertjan on January 14, 2013 at 07:30 AM PST #

Nice, but it completely messes up the "new file" menu due to the fonts there.

Posted by guest on July 21, 2013 at 06:24 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today