In the original design for Nimbus there were large,small and mini versions of components. Small and mini components are very useful when you are creating tool pallets or other UI where space is very tight. Apple recently added this to their new look and feel in the latest java versions seeÂ Technical Note TN2196. We are using the same client property key and values as Apple to beÂ compatibleÂ but I have also added “large” as a option. Not sure “large” is asÂ usefulÂ as “small” or “mini” but might look good in wizards or dialogs. Check out the screenshot to see how they look.Â
Nimbus: Large, Small, Mini Components
by Jasper | Dec 7, 2007 | Java, Nimbus | 18 comments
- Swing links of the week: December 9, 2007 - [...] Potts posted an update on the Nimbus development progress. The screenshot shows the support for the different component [...]
- Web 2.0 Announcer - Nimbus: Large, Small, Mini Components... [...]In the original design for Nimbus there were large,small and mini versions of components. Small…
The small and mini scrollbar arrow buttons look kinda edgy in the screenshot. I have a tinny problem with some of the colors you chose for progress bars and window decorations and an even tinier with the asymmetry in the scroll bars but other than that it looks truly great!
I’m quite looking forward to the release of Nimbus. I have a couple of questions about the screenshot included, here, though. First, will the radio button and check box text be aligned so that they have the same horizontal start position, i.e., the radio buttons look like they’re shifted a little to far to the right. Second, the arrows on the scroll bars look great, but the arrows on the combo boxes and spinners don’t look like they’re scaled properly for the different sizes. For example, the arrows for the large combo boxes are smaller than the rest which are all the same size. And the arrows on the small and mini spinners look bigger than the arrows on the regular size spinner.
On the whole it all looks terrific, btw.
looks awesome. any release dates?
We develop a java based point of sale system that is run on terminals with a touch screen. The large components are just what the doctor ordered! If anything is there a way to make them larger, or to turn them on for all components?
Josh Marinacci: This will be in Early Access build 09 of 6uN which should be out after christmas. Final release is not firm yet but mid next year is a good guess.
Paradox: Intresting example use case, it the moment that is not possible but could be done. I will think about adding that functionality in if I get a chance. What components do you need to be big?
We also use Touchscreens and we need the RadioButtons and Checkboxes to be big.
Nimbus looks great; glad to see it moving along. I did a little experiment this afternoon — extracted Nimbus from the 6N JDK to put it into its own jar file, then ran that with the normal JRE. That worked just fine, as far as I could tell. I then pulled down the scene graph API that’s being inserted into the JavaFX code base, and used it to create a small tree of Nimbus-style components…all was well with that too. Transforms messed up Nimbus because of its caching, so I did a little reflection-mining and turned off all of the caching. There’s a slight drop in speed, but computers are getting faster, so I can live with it.
The bottom line is that I was able to have very nice looking anti-aliased Nimbus components doing all kinds of animated tricks (through the scene graph’s animation API), and it all stayed perfectly “swing”, and interactive, the whole time.
Obviously Nimbus hasn’t been released yet so who knows where it’s going, but if you haven’t already done so I’d very much hope that you’ll add (if necessary) and document any “switches” necessary to use this look and feel when arbitrary transforms are in place, and perhaps even have an understanding of when animation is being performed.
A “transform-compliant” Nimbus makes it quite easy to create zooming user interfaces, and I’m sure many other types of UIs as well.
Hope to see Nimbus soon!
Nimbus, overall, looks great and I think presents a nice look and feel for Java. However, I don’t exactly think the colors of the JProgressBars fit the theme. Also, I’m not the only one of this opinion, the indeterminate JProgressBar just doesn’t look right at all. A bit “ugly” compared to the rest. Don’t take too much offense, It’s a small thing compared to the rest of Nimbus (which is quite good).
Something similar to http://www.asmcbain.net/projects/progressbar/preview.progressbar.png might be a bit better. I made a Swing version, available here: http://www.asmcbain.net/projects/temp/ProgressBarDemo.jar which doesn’t look /exactly/ like that image … now I’ve never designed L&Fs, and that ProgressBar needs a little “love” (it behaves oddly when stretched a lot in a certain direction too fast, and it doesn’t follow the JProgressBar API). It doesn’t use any images.
Art: I was not responsible for the design of Nimbus and it was already implemented as a GTK theme for Solaris and a web version for Sun web apps. So there was no scope for me changing the design. You can simply change the color of the progress bars in Nimbus by changing the “nimbusOrange” color in UIManager, see https://jasperpotts.com/blog/2008/08/nimbus-uimanager-uidefaults/ .
To get your design to work with as a Swing skin you will need to create your own subclass of BasicProgressBarUI and then place its class in UIManager under the key “ProgressBarUI”. It will then be used as the skin for all progress bars in your application. You can possible skin Nimbus to look similar though you can not change the animation on the visuals without creating a subclass of BasicProgressBarUI.
and how do you activate the small, large and mini styles?
matt: Have a look at the src for the Laffy demo as a example https://laffy.dev.java.net/
thanks jasper, i found SizeVariants.java in the laffy src.
but it seems as if the size is manually set for each component. i was more looking for something global like
Is there a way to make the “large” size larger?
Mitch: not at the moment but we can look into it for 7 if we have time as there have been several requests.
Sorry Matt there is no global setting for size, that is again something we could think about adding as it seems sensible.
Yeah I too am working on a POS system and the holy grail here would be a “scale factor” that is applied to all components. Bringing in Vector graphics etc…
That way the UI can be scaled to the screen. I have some screens where the “large” is too large and some where the large is too small…
I was wondering if there is a way to make Netbeans use the ‘small’ Size Variant when using the Nimbus LAF? If therea comandline switch we can use for this ?
I don’t think there is any way to do it without creating some code patch.