InfoQ

News

Nimbus Look-and-Feel: Vector UIs for Java

Posted by Geoffrey Wiseman on Sep 12, 2007 07:15 AM

Community
Java
Topics
Announcements
Tags
Java SE ,
Swing

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.

2 comments

Reply

User-Controlled Scaling by Geoffrey Wiseman Posted Sep 12, 2007 10:57 AM
Worst!!! by Shahzad Ismail Posted Sep 13, 2007 5:17 AM
  1. Back to top

    User-Controlled Scaling

    Sep 12, 2007 10:57 AM by Geoffrey Wiseman

    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.

  2. Back to top

    Worst!!!

    Sep 13, 2007 5:17 AM by Shahzad Ismail

    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.

    Regards,
    Helpless-Java-desktop-app-developer

Exclusive Content

Diary of a Fence Sitting SOA Geek

In this presentation, Mark Little explains the history of SOAP/WSDL/WS-*-based web services and RESTful HTTP and highlights how the two approaches might converge into a single solution.

Flex for XML and JSON

Platforms need interoperability. In this article Flex interoperability with JSON and XML is explored including direct mapping to chart and grid components.

Measuring Agile in the Enterprise: 5 Success Factors for Large-Scale Agile Adoption

Michael Mah analyzes the development process in 5 companies: 2 Agile (one of them BMC) and 3 classic. He presents the factors which contributed to the success of BMC's Agile adoption.

Tom Preston-Werner on Powerset, GitHub, Ruby and Erlang

In this interview filmed at RubyFringe 2008, Tom Preston-Werner talks about how both Powerset and GitHub use Ruby and Erlang, as well as tools like Fuzed, god, and more.

David Laribee on Alt.NET and its Mission

David Laribee discusses the purpose of ALT.NET, its mission and future.

Discover RailsKits and Stop Writing Redundant Code

Ruby on Rails has become a popular Ruby framework for creating web applications in recent years. An aspect of creating a web application is the need to repeatedly create the same base functionality.

A Formal Performance Tuning Methodology: Wait-Based Tuning

Steven Haines talks about tackling web application performance tuning by proposing a method called wait-based tuning.

Shaw and Fowler About Forging a New Alliance

Shaw and Fowler talk about the need for a new relationship between the business department and the IT department. Studies have shown that projects mostly fail due to miscommunication between the two.