JavaOne: JavaFX Gets Oracle's Backing as Sun Releases Update, and Demos Authoring Tool and TV App
Sun has launched JavaFX 1.2 this week. It is a substantial update to the platform which includes language level changes, a new charting API with support for many common chart types such as area, bar, bubble, line, pie, scatter, and X/Y, and beta support for the Linux and Solaris platforms.
As well as the charting API, welcome additions to the platform include a more extensive set of pure JavaFX controls such as buttons, ListView, ProgressBar and Slider which are fully skinable, improvements to the layout API and layout classes, RSS/Atom feed support, local data storage, and considerable improvements to start-up times.
Sun is still refining JavaFX script and has made a number of significant changes in the 1.2 release, primarily focused on simplification. Of particular note, JavaFX Script has dropped support for multiple inheritance in favour of mixins. In JavaFX 1.1, a JavaFX class could inherit from classes and interfaces, with complex rules about which classes could be inherited. In JavaFX 1.2, a JavaFX class may inherit from no more than one (non-mixin) class, and any number of mixins. Mixins look like regular classes, but have the mixin modifier on their declaration, and cannot be instantiated directly. They are analogous to interfaces in Java, but differ in that they can have variables and implementations that are shared by all the classes that extend them. There are also a number of smaller language changes. A complete list can be found here.
Unsurprisingly the JavaFX 1.2 SDK release is not binary compatible with the JavaFX 1.1 SDK and if you use any jars or third-party JavaFX libraries they must be recompiled for the new release.
JavaFX tooling still remains an issue with limited support for the popular Eclipse IDE and no authoring tool available. Both of these issues are though getting some attention. Neil Bartlett is working on improvements to the Eclipse plug-in at Sun's invitation, and writing on his blog he states:
"To my great delight, I was given a free rein to enhance the plug-in however I deemed necessary. Unfortunately Rome was not built in a day, and fully-featured language IDEs cannot be built in 6 weeks. So I had to choose where to focus my efforts, and I have mostly chosen to focus on the raw usability of the code editor. To this end, I have added auto-indentation and brace insertion, auto-completion, continuous feedback of errors, block folding, and integration with the Eclipse Outline view. You should also see pop-ups of the JavaFX API documentation, both during completion and when hovering the mouse over an identifier."
Sun's Nandini Ramani, director of engineering for the JavaFX platform, has given the first public demonstration of its JavaFX authoring tool at JavaOne. The as yet unnamed tool is designed to support team collaboration over a network. It offers importing and compositing of graphical, audio and video assets and allows authors to add interactions, animations and visual effects to create the interface. Like other animation tools, graphical assets are staged into a scene controlled by a timeline. Using drag-and-drop gestures, you can bring in assets and link them to the timeline for animated display. The resulting application can be used wherever the Java runtime exists and the tool allows a developer to target an application to multiple devices simultaneously. Sun expects the product to be generally available by the end of the year.
As well as browsers, desktops and mobile devices, Sun is leveraging its success with the Blu-ray disk standard BD-J to bring JavaFX to televisions. Ronan McBrien, JavaFX architect at Sun, demonstrated a JavaFX application that previewed and downloaded movies and other offerings to a 42-inch LG Electronics TV.
Many in the community have wondered whether Oracle would maintain the same commitment to JavaFX that Sun has. Oracle rarely offers any insights on product strategy before it completes an acquisition, but in a surprise move Oracle's chief executive Larry Ellison offered public baking for JavaFX at JavaOne, suggesting that it should be adopted by the OpenOffice group as they work on the UI redesign planned for the next version of the suite.
Stephanie Davis (nee Stewart) Dec 21, 2014