Saturday, January 30, 2010

Nimbus look and feel


Nimbus has been out for a while now. It has some great features. But why isn't it being used more?

Nimbus is the name of a look-and-feel designed by Sun for the Java Desktop System. It provides a great alternative for the Windows look and feel. But it provides more than that. It has a collection of features that allow developers to customize the look and feel of their products. Nimbus provides the ability to put custom skins on your product to help brand your product.

This is how is does that. All painting for components is done with simple stateless implementations of the Painter interface. These painters are stored in the UIDefaults table so they can be replaced if you would like to change the look of components or can be used in your own components if you would like to create a custom table header for example that looks the same as the standard Nimbus one plus something extra. All colors, icons and fonts are derived off UIDefaults keys so the whole UI can be customized by changing values in the UIDefaults tabl
All of the colors, fonts, icons, borders and painters are exposed through the UIDefaults table which means they are available to your 3rd party components to help you skin them in a Nimbus style.

So why isn't it being used more often given the amount of time that it has been out? There are two main reasons.
The first reason is the default file browser. Basically it is short. What this means to the user is that they have to scroll over all the time to be able to find anything in a directory of folder that has more than a handful of items in it. This is a rather annoying feature that would discourage any developer familiar with usability. So many developers will put their application look and feel back to the good old favorites hat they are familiar with.

The second reason is that the text objects all have the feature (or bug depending on point of view) that don't work as expected. The more troubling of these is the foreground, background, and highlighting behavior. Another reason for most developers to give up on Nimbus.
At present the best way to deal with this is a work around. The work around is basically to use set the text back to the old style handling.

To check to see if Nimbus is present and enable Nimbus if it is and then set the text panes so that they have the expected behavior you can use the following:
(Note: This example includes the text object decleration but this is usually done somewhere else in the IDE GUI build e.g. Netbeans

for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
try {
UIManager.setLookAndFeel(info.getClassName());
} catch (ClassNotFoundException ex) {
// your exception handling
} catch (InstantiationException ex) {
// your exception handling
} catch (IllegalAccessException ex) {
// your exception handling
} catch (UnsupportedLookAndFeelException ex) {
// your exception handling
}
break;
}
}

// this is usually done somewhere else in the IDE GUI build e.g. Netbeans
javax.swing.JTextPane DocViewTextPane = new javax.swing.JTextPane();

// set text pane so it will behave as expected.
DocViewTextPane.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());



Wednesday, January 13, 2010

Netbeans, Eclipse and Oracle Sun

Image representing NetBeans as depicted in Cru...Image via CrunchBase

What will happen to Netbeans with the Oracle acquisition of Sun? Once the merger happens I think it will become obvious surprisingly quickly.

Netbeans is the number one competition to Eclipse which is of course owned by IBM. With that said and the number one alternative to Eclipse, Oracle may go full guns on adoption and of course lots of new capabilities and features Netbeans would be available in short order. That would be my guess. One more straw to grasp from IBM.

On the other hand, Oracle also purchased BEA Weblogic which uses Eclipse as its IDE. That would mean a substantial cost to convert, as well as some alienation by developers un-wanting to make the switch to a new IDE no matter whose it was.

Yes there are all those other IDE's that Oracle also owns. But how far have they gone, not far. But Netbeans is a competitor.

You can read from developer comment to developer comment (only counting ones that have actually used current versions of both) I use Eclipse at work, because I have to, but I prefer and use Netbeans for personal projects. Yes I to have fallen into this category.

Why do I like Netbeans better? Its not a reason commonly given. The interaction with CM is much better! I have seen many numbers of my development team mangle or loose checkins, commits, and all sorts of other misshapes in Eclipse when dealing with CM repositories. To me that is loss productivity, and development costs. But that is a side issue to the article.

I think Oracle will be good for Netbeans as a serious competition to yet another IBM product. IBM the only commercial competitor to Oracles core business line.



Reblog this post [with Zemanta]

Wednesday, January 6, 2010

MySQL and Oracle and the EC

Screenshot of the MySQL administrator in Fedor...Image via Wikipedia

The review by the European Commission of the Oracle Sun merger just got a whole lot more interesting with the activities of one of the founders of MySQL. Michael "Monty" Widenius, the creator of MySQL stepped into the fray opposing the take over, delivering over 10,000 signature to the EC of those opposed.

I highly recommend reading Monty's blog at http://monty-says.blogspot.com/2009/12/help-saving-mysql.html

If you have code running on MySQL let the EC know just how much competition to Oracle there really is.

Regarding Sun's drop in 25% drop in revenue, just compare that to automotive and housing. But even more, compare that to the same industry. Among the top five server vendors, Dell was hit hardest, with quarterly server revenue tumbling 31.2 percent. Hewlett-Packard showed a 26.2 percent decline. Sun Microsystems watched its revenue dive 25 percent. IBM saw its sales drop 19.9 percent. Sales at Fujitsu/Fujitsu-Siemens fell 18.8 percent. Claims about merger uncertainty effecting sales seems to be way out of proportion.

Reblog this post [with Zemanta]