I love it when Sun employees like Richard Bair and Jasper Potts demonstrate features, and show code samples (in wet concrete of course), for upcoming JavaFX releases. In this post I'd like to bring some of these Sun-leaked features and code samples to light. Please note that this talk was a preview, and things will of course change before the final JavaFX 1.3 release.
From Enterprising JavaFX by Richard and Jasper at Devoxx (and the 1960-70s judging from the Devoxx theme-art this year)
After delivering a brilliant explanation of how to use the JavaFX Task API (introduced in JavaFX 1.2), Richard went on to expose some of the planned JavaFX 1.3 controls. Here's a shot of the slide that denotes some of the UI controls in 1.3 with asterisks:
The ListView, TreeView and TableView controls will allow you to customize their contents with the use of the Cell class shown in the shot below:
To create a custom cell, use the cellFactory function reference of the ListView, TreeView or TableView classes, and supply background, node, and/or foreground values. This approach allows the runtime to memory manage cell instances:
Please note that ListView was introduced in 1.2, but will be greatly improved in 1.3. TreeView will be introduced in a basic form in 1.3, and TableView will be released post-1.3.
Here's a busy shot of a UI controls demo from Richard, for which Jasper later apologized because the demo isn't skinned to Jasper's liking:
Later, Jasper discussed the strategies for styling JavaFX components moving forward as shown in the shot below, and then focused on CSS for styling components on desktop, mobile and TV:
Jasper then discussed the regions construct that will be included as an internal API in 1.3, and possibly exposed to developers in future releases:
Regions can be used, for example, to help create custom component such as the ScrollBar shown below:
Another upcoming item of interest from this presentation is that the underlying graphical toolkits will be replaced (post-JavaFX 1.3) with Prism, which will provide a much faster UI and a common toolkit across devices on which JavaFX is deployed.
This post has only scratched the surface of what was presented in the hour-long Enterprising JavaFX session at Devoxx, but hopefully it gave you a taste of some the many features coming in JavaFX 1.3. Thanks to Jasper and Rich for sharing!