Dabbling with the dark arts again

Well, the subject of dark themes seems to have come up again in the NetBeans world recently, with Geertjan blogging about Stan Aubrecht’s dark theme for Nimbus.  This looks great, though as you might have gathered from the look and feel of Praxis LIVE, I quite like dark look and feels! :-)

Unfortunately, the problem with Nimbus is it’s still not officially supported in NetBeans due to some EDT issues (though seems much more stable than the last time I tried it).  Also, to quote from Geertjan’s blog, “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.”  Well, as I blogged about in the Dark arts of NetBeans hackery, it is possible with some devious hackery to alter things like the top bar of the Options window, and this is done in Praxis LIVE, so I thought I’d have a go at providing a plugin for this look and feel that could be used within the NetBeans IDE (or other platform application).

NetBeans IDE running with Praxis LIVE look & feel

NetBeans IDE running with Praxis LIVE look & feel

Praxis LIVE look & feel plugin

The resulting plugin(s) for NetBeans 7.2 can be downloaded from here.  It seems to work OK, but should be treated as an experimental proof of concept!  There are actually two plugins in the download,

  • praxis.laf – this is the primary look & feel library, and is derived from the excellent NimROD look & feel by Nilo J. González, with a few bug fixes and some less gaudy colourful icons.  The code in this plugin is LGPL licensed.
  • praxis.live.laf – this plugin provides the integration with the NetBeans platform UI and the variety of hacks mentioned earlier.  A large chunk of code is derived from the Metal LAF integration in the platform, and so it is also under the GPL w/CPE license.

The source for these plugins is available in the core Praxis repository and Praxis LIVE repository respectively.  The only difference between these NBM versions and the default Praxis LIVE build is a change in the manifest so they’re not hidden from the plugin manager (makes un-installing them a little easier! :-) )  NB.  You may still need to select Show details in the Installed tab of the Plugin manager to un-install them.

Worth taking further?

Well, as mentioned above, these were primarily built just to see if they worked, and to add to the debate around dark themes for the IDE.  I’m not sure whether they’re worth developing further (except as part of Praxis LIVE of course!).  Feedback and thought about that would be welcomed.

There’s some room for improvement, too.  I’ve tried to work around as many hard-coded colours from modules that are used in Praxis LIVE, but obviously IDE modules that are not included haven’t been factored in to this.  These plugins also don’t benefit from most of the (primarily Faenza-based) monochrome icons used throughout Praxis LIVE.

Demonstrating some of the monochrome icons used within Praxis LIVE.

Demonstrating some of the monochrome icons used within Praxis LIVE.

About these ads

7 thoughts on “Dabbling with the dark arts again

  1. IMO, its about time Netbeans starts the switch from swing to fx :) LNF itself will become lot more eye pleasing and the customization of LNF will be easy too :)

    • IMO, it’s still too early for that switch, until there’s a widely deployed and stable OpenJFX. Given how deeply entwined Swing is to the NetBeans platform too, it will be interesting to see how that might develop. Not a job I’d want to take on! :-)

    • Sorry, but not everything gets better because it is replaced by something newly developed. I predict: JavaFX will suffer the same problems as Swing has, it needs time till a stable state is spread far enough and the starting pain lesses. Netbeans is primary an IDE – enhancements with JFX are nice, but there are areas that need much more work, than what will be hindered by forcibly switching to JFX.

    • The only thing you’re doing wrong is trying to install it on NetBeans 7.3! :-)

      The praxis.live.laf plugin currently has an implementation dependency on that look & feel library. Removing it would be possible but would require copying even more code or some reflection hacks. Therefore, you will have to download the code for the two modules and rebuild against NetBeans 7.3 to get them to work.

      This problem highlights the fact that these modules were originally intended to fulfil a need in Praxis LIVE, rather than provide a general solution for the IDE / platform. I will see if I can address this issue at some point in the next Praxis LIVE dev cycle.

      • Indeed, it’s a nice marketing tool. Everyday I look at my NetBeans , I will think about Praxis LIVE :)
        For info, NetBeans 7.3 rc1 is coming in a few days.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s