The Source for Java Technology Collaboration
User: Password:



Kirill Grouchnikov

Kirill Grouchnikov's Blog

NetBeans look and feel competition - a low-hanging iPod

Posted by kirillcool on December 26, 2005 at 01:55 AM | Comments (2)

About two weeks ago NetBeans has announced a Look and Feel competition (which should really by Look only, since they are accepting screenshots). One of the more enjoyable ways to create an attractive screenshot (although this depends on male-to-female ratio on the judging panel :) is to use the Substance NB module that allows using the Substance LAF integrated into the View menu.

One of the users has asked me if it would be possible to make the watermark image "bleed" through the editor panel. Obviously, without changing the NB editor module it's not possible. However, now it is possible to make the watermark bleed through trees, tables and lists. First, you are welcome to view a few Substance-enhanced NetBeans screenshots - note that the trees / tables / lists are opaque and do not show the watermark. Starting from the latest drop of version 2.2 (available in NBM download), Substance supports the -Dsubstancelaf.watermark.tobleed VM flag (no value needed). Once specified, this flag makes all trees, tables and lists transparent. Here's a screenshot to illustrate this (note the left-side trees that show the watermark - click for a fullsize view):

keira-netbeans-small.png

Note that although it's nice to use this option for the above competition, not all NetBeans screens will look good using this VM flag. Although this option instructs all trees, tables and lists (along with the cell renderers) to be transparent, it can't prevent the cell renderers from painting their own background if they override the paint() method. On the other hand this option can spot such problematic places in your application (unless they're there on purpose).

In addition, the latest NBM version (under dev 2.2 directory) allows changing the watermark image from View -> Watermark -> Image menu. The history is limited to five entries (updated on selection) and persisted.

One last thing - if you like Substance, help internationalize it! (small print - eternal glory is not guaranteed :) Starting from version 2.2 (code-named El Paso) the additional UI elements (system menu items, heap status panel, menu search panel) are internationalized. You are welcome to view the list of available translations and send me additional translations to kirillcool [at] yahoo.com. Thanks in advance

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • are there any tutorials online about creating your own look and feel, just like Substance?

    Posted by: jhook on December 27, 2005 at 03:34 PM

  • jhook,
    Not that i'm aware of. However, there are so many open-source LAFs (and that on top of the core JDK LAFs), that all you need to do is to download a bunch of them and starting reading. Some of them can be harder to understand at first - i know that the code complexity of Substance has grown a lot since the first version. Eventually, the LAF is exactly what it means - drawing some stuff (the look) using either Java2D or images and tweaking the core behaviour (the feel) using listeners and layouts. You'll have to be familiar with basic Java2D operations, layout managers and listener mechanism. After that - delve in a LAF of your choice :)
    One thing i have to say about writing your own LAF - it's one of the best ways to learn Swing.

    Posted by: kirillcool on December 28, 2005 at 02:07 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds