Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Nimbus Look-and-Feel: Vector UIs for Java

Nimbus Look-and-Feel: Vector UIs for Java

This item in japanese


In his announcement that the Nimbus Look-and-Feel (LAF) is nearing completion, Jasper Potts described some of the technology behind Nimbus, and provided some screenshots:

All of Nimbus is rendered with 2D vector graphics, there is not one image even for all the icons. This means that the whole of Nimbus is just 56k as a packed jar which is pretty impressive for a whole rich look and feel.

This is technically impressive, but it also has the potential to support a resolution-independent interface suitable for high dot-per-inch (DPI) displays, a topic that has received a lot of attention in recent months.

Although many feel that high-dpi user interfaces are important for upcoming advances in high-resolution displays, Jeff Atwood has argued that increases in monitor DPI statistics have been slow and that claims of a 200-dpi future around the corner may be excessive:

Regardless, it's sobering to consider that the resolution of computer displays has increased by less than a factor of two over the last twenty years. Sure, displays have gotten larger -- much larger -- but actual display resolution in terms of pixels per inch has only gone up by a factor of about 1.6.

Short of some kind of miraculous technological breakthrough, I can't see computer displays reaching 200 DPI in "a few years". It's unlikely we'll even get there in ten years. I'd love to be proven wrong, but all the evidence of history-- not to mention typical consumer "bigger is better" behavior-- is overwhelming.

The Nimbus UI is rendered by stateless implementations of the Painter interface. The colors, icons and fonts are stored in UIDefaults, where they can be customized or read for skinning components to fit within the Nimbus LAF. Nimbus is likely to be more CPU/GPU-intensive than previous look and feels, but still quite fast. The painters are 'drawn' built using a new visual tool:

We have built this tool that is like a mini Photoshop or Illustrator that lets you graphicaly draw all the 2D vector graphics for each of the states of the components. Those graphics are then compiled into Java2D painting code which is exposed as simple Painters to the LookAndFeel. It has support for advanced features like sub-pixel acuracy, complex gradients, layers and layer effects like drop shadow and glow. The tool is still something internal that we have hacked together but we are working on getting it opensourced and making it into something you will be able to use. Both for creating new look and feels and for drawing painters that you may want to use anywhere in your application.

The first alpha build will be available shortly. In the meantime, you can stay in touch with Java and Java SE news here at InfoQ.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • User-Controlled Scaling

    by Geoffrey Wiseman,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I have to admit, even though Jeff Atwood makes a compelling case for the relatively slow gains of DPI, I've gotta say that as a high-resolution user, I sometimes wish I could scale programs that were written for the general case of lower-resolution (and thus often DPI) users. I really like the way IE7 allows full-page zoom, and if that were an option for all my applications, I might employ it sometimes.

  • Worst!!!

    by Shah Ismail,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The worst GUI I've seen to date...
    I don't know who comes up with this idea of
    *Vector 2D* like its a big show???

    Look at .NET GUI, its 5+ years old and it feels alive.
    GUI is supposed to be alive and reactive. Even IntelliJ IDEA ppl came up with a better version of GUI...

    I'm sure SUN is dumping millions of dollars onto some BigShow University OldWorld professor's lap who knows nothing abt modernized HCI elements but knows that *Vector 2D* will win the Desktop GUI world for Java!!!
    !wholly crap!

    BTW, look at some of the application being developed with AIR and it gives a feeling of the future.


Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p