Nimbus Look-and-Feel: Vector UIs for Java
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.
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!!!
BTW, look at some of the application being developed with AIR and it gives a feeling of the future.
InfoQ Sep 01, 2015