It hasn’t quite been four weeks yet, but I’m already back to announce the availability of the final release of ControlsFX 8.0.0. This release is a combination bug fix and feature release, having gone through only one (proper) developer preview release (there was supposed to be a developer preview 2 release, but due to issues deploying the build we had enough time to fix up the remaining bugs / features and now we’re at the final release! ๐ ). A huge number of bugs have been fixed, in particular related to dialog layout. It is highly recommended that people use JavaFX 8.0 b91 or above when running ControlsFX.
For more information on what ControlsFX is, who it is aimed at, how to get it / use it / contribute back to it, you should refer to the ControlsFX page. A few things to note are:
- This release of course includes all the features that were in developer preview 1. If you aren’t familiar with that release, be sure to check out the blog post for that release!
- I clarified the (slightly odd) approach to release versioning for ControlsFX over on the ControlsFX page (scroll down to the ‘Release Versioning’ section). In short, we use the common x.y.z numbering scheme, where the x.y values represent the minimum JavaFX version required, and the z value represents the release. In our current case, ControlsFX 8.0.0 is still being developed, and requires at least JavaFX 8.0. Future releases will increment to 8.0.1, 8.0.2, and so on until we require JavaFX 8.1 or whatever version comes after JavaFX 8.0. In short, despite 8.0.0 being a big version jump (it’s the first release after all!), we plan to increment only the .z value for a very long time! ๐
- Visit the bitbucket project to watch (or fork) the project. If you fork please consider providing pull requests so that ControlsFX continues to improve!
To conclude this post, here’s a quick rundown on the new features included in this final 8.0.0 release:
New in 8.0.0 final:
Dialog ‘Command Links’ support
Command links are common on the Windows platform. The version we have in ControlsFX looks like the following:
Actions API
The newly-added Actions API is used by both the dialogs API and the ButtonBar API. It essentially abstracts away the notion of how a control is represented, instead focusing on the properties of the control (e.g. text, graphic, etc). This makes it really easy to reuse the same Action in multiple places inย your UI. We’ve also developed convenience API to convert Actions into the common UI controls (see the ActionUtils class for these methods).
Hugely improved JavaDocs
One of the goals of ControlsFX is to have high quality JavaDocs, so one of the main drivers for this release was to improve those further. As always, the JavaDocs can be read online, but they are also available as part of the download. The intention is that the JavaDocs should be the primary way of people learning how to use the ControlsFX API, so there are good code samples and screenshots of the controls in action. Hopefully this will help to get people started quickly.
Updated styling for SegmentedButton
The SegmentedButton control initially had one style, which is now called the ‘dark’ style. This style is now no longer the default, instead being replaced with styling that is more fitting with the JavaFX 8.0 Modena style. However, the dark style is not lost – it is still available to those of you that prefer it. Refer to the SegmentedButton JavaDoc to see how to switch between the two styles available. Here’s the difference:
Improved ControlsFX sampler application
To help people investigate the ControlsFX controls, the ControlsFX sample application has seen some further polish, integrating a WebView to make browsing the JavaDocs easier. Here’s what it looks like:
New in 8.0.0 Developer Preview 1:
ButtonBar
A horizontal container for buttons, which automatically places the buttons in the correct position for the underlying operating system. Just annotate the buttons with their type and it’ll handle the rest!
Dialogs
A collection of pre-built, modal dialogs providing a really simple yet powerful API. Supports all manner of pre-built dialogs, and even allows for custom dialogs to be easily created.
GridView
A fast, virtualised grid container similar to ListView, except that there can be multiple cells on each row. Great for showing images!
RangeSlider
When you want a user to specify a range, right now you need to give them two text fields to type into (or two sliders). Yuck! This control is essentially the standard JavaFX slider but with two draggable thumbs on it – one representing the low value and the other the high value. Much better!
Rating
A simple control that allows users to specify a rating between zero and a maximum value. This control supports partial ratings and updating on hover or on click.
SegmentedButton
When you have a ToggleGroup with buttons in it, it looks nicer when the buttons are grouped together (rather than individual buttons). This is exactly what the SegmentedButton control does – it ‘merges’ together all of your buttons in a ToggleGroup so that it is clear to users that the buttons are related.
Great. All my respect for it!
Thanks! ๐
I’m a bit late asking this question as the release has just dropped but is there any reason the modal dialog has to have a parent of a window?
In the application I’m writing the top level component is a tab pane (like chrome) and I would like a dialog to popup and stop input in one tab say, but a user can still move to another tab and carry on in there.
Very nice to see this library though, thanks.
Good question. It is true that the owner can only be a Window (or null – an owner does not need to be specified). In fact, I’ve never actually encountered a modal dialog API that allows for modality of a single tab. Nonetheless, I’m not sure it is something I would like to bake into ControlsFX. I would suggest in your case having a custom dialog that effectively puts a glass pane across your tabpane content would be the best option. Make it gray and semi-translucent, with a lightweight dialog on top, and you should get a really nice effect.
I agree that it isn’t standard behaviour, I was just hoping it existed so I could drop it in :). In my swing app I have something similar to what you have described. It was quick and dirty though and doesn’t allow things like dragging the dialog around the tab or resizing the dialog. JavaFX will make all this easier though so I’m sure it won’t be a problem to implement once I get onto that part. Thanks.
I’ve started hacking on this in ControlsFX.
That’s great. Let me know how you get on and I can try it out for you if required.
I’m sure this is what you are thinking as well but what I see in my head at the moment is a dialog just like normal. Rather than this dialog blocking the whole stage, it just blocks whichever node you have set as the parent (in my case this will be the main content in my tab). The dialog behaves as usual apart from the fact that you can’t drag it outside of the parent node.
Similar to this:
http://i.imgur.com/TkqAfK7.png
you can see that the current tab is blocked but I could switch to the market data view tab if required.
@Nick: It is now available for testing in the ControlsFX repo.
Cool. I’ve tested the lightweight dialogs and they are exactly what I had in mind. Thanks.
I should add that such a feature would be a potentially welcome addition to ControlsFX, if you’re ever interested in contributing.
Good Job
Cool!
Great!
I have problem with launching controlsfx-8.0.0-samples.jar.
I am using ControlsFX 8.0.0 Final
– JRE 1.8.0-ea-b92
– WindowsXP SP1 32bit
Exception:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Lau
ncherImpl.java:351)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImp
l.java:304)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:778)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherIm
pl.java:867)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:
56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoClassDefFoundError: org/controlsfx/control/SegmentedButto
n
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2536)
at java.lang.Class.getConstructor0(Class.java:2836)
at java.lang.Class.newInstance(Class.java:413)
at org.controlsfx.HelloControlsFX.start(HelloControlsFX.java:99)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:810)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:260)
at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:226
)
at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:223
)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:223)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatch
er.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39
)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
… 1 more
Caused by: java.lang.ClassNotFoundException: org.controlsfx.control.SegmentedBut
ton
at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:353)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
… 16 more
Exception running application org.controlsfx.HelloControlsFX
How are you attempting to start the samples application? Using the following command?
java -cp controlsfx-8.0.0.jar:controlsfx-8.0.0-samples.jar org.controlsfx.HelloControlsFX
If that doesn’t work, replace the colon between the two jar files with a semi-colon.
Problem solved: after replacing colon between the two jar files with a semi-colon.
Path separator for Windows is semi-colon, yes.
Great work!
Thank You Jonathan.
– but:
for ‘Exception’ Dialog: button click Ope… and button click Open exception – performance scrolling – slowly, click + (maximize) – slowly rendering window – not full screen.
Is possible resizing of window?
If it is slow then perhaps your machine is running JavaFX in software renderer rather than using your graphics card.
My Graphics Chipset: ATI Radeon X1200 Series
JavaFX 8.0 does not support this graphic card -> software renderer.
Scrolling is basic feature – Why is need super graphic card?
JavaFX 8.0 will support Windows XP?
I’m curious if the GridView can be used with 3D Meshs?? I just noticed it and itr uses ListCells, but I’m wondering if those cells can contain 3D Meshs besides “Images” or “Colors?”
If not can we see a release for that anytime soon? Since 3D is making a HUGE PUSH into FX now, we need to make sure everything can support 3D.
I’m not sure where you see that GridView uses ListCell – it doesn’t, it uses GridCell. In any case, review the API here: http://jonathangiles.net/javafx/controlsfx/javadoc/ You’ll see that any Node can be set inside a GridCell, including 3D.
Sorry I meant GridCell, It says ListCell on the first line of the api, so that’s why I said it by accident instead of GridCell which was 5 words later ๐ I checked out the API, I just wanted to be sure 3D works(as some things don’t work with 3D yet), thanks!