JEP 209: JavaFX Scene Builder Update

OwnerSimon Vienot
Created2014/06/25 17:51
Updated2014/10/01 16:14
TypeFeature
StatusClosed / Delivered
Componentclient-libs
ScopeJDK
Discussionopenjfx dash dev at openjdk dot java dot net
EffortM
DurationM
Priority3
Reviewed byEric Le Ponner
Endorsed byRichard Bair
Release8u40
Issue8048125
Relates toJEP 205: New Controls for JavaFX
JEP 204: JavaFX Accessibility

Summary

Update Scene Builder (SB) to support the new JavaFX features introduced in the 8u40 release and also address the most critical limitations of the SB 2.0 release, in particular the handling of FXML references. No significant new features will be added.

Goals

Non-Goals

Motivation

JDK 8u40 release brings important changes to JavaFX with new UI components and the support of accessibility. Scene Builder must be updated to support this new functionality. Beyond the need to expose the new features to the user, such as providing new UI components in the builtin library, we must update SB to allow the user to work with documents containing any of the new UI components. This is due to the fact that SB is packaged as a self contained application bundle, with its own private copy of the JRE. The private JRE determines the set of builtin components which SB is able to instantiate, so it should always be aligned with the last release of the platform. We also need to address the main limitations of the SB 2.0 release, especially those which prevent preserving the integrity of the content (and formatting) of FXML documents.

Description

The Spinner control will be made available in the Controls section of the Library Panel so that the user can drag and drop it into the Content or Hierarchy panels, and further position or re-parent it, edit its properties, similar to what is done with a ComboBox control today.

The FormattedText control will be made available in the Controls section of the Library Panel so the user can drag and drop it into the Content or Hierarchy panels, and further position or re-parent it, edit its properties, similar to what is done with a TextField control today. The StringConverter used by the control will not be provided by Scene Builder and will have to be set programmatically by the user.

The Dialog and Dialogs components will be made available in the Miscellaneous section of the Library Panel so the user can drag and drop them into the Content and Hierarchy Panels, provided they are placed at the root of the document. The user will be able to edit the properties of the Dialog and Dialogs using the Inspector panel. It will not be possible to render the content of the Dialog(s) inside the Content Panel since SB is currently only able to render root components which are JFX Nodes, and the Dialog(s) are not Nodes. It will be possible to Preview the content of the Dialog(s) in a separate window.

Accessibility is likely to require an extension of the FXML file format. Scene Builder adheres strongly to the FXML specification. Some work will be required to ensure that SB is able to read, edit, and write FXML files which include accessibility information. SB will not support the editing of this information but it will preserve any existing information found in an FXML file (e.g., hand-coded by the developer).

Scene Builder 2.0.1 will provide support for the fx:reference and $fxid constructs such that FXML documents using these constructs can be safely edited and remain valid.

Testing

This minor update of Scene Builder does not introduce any significant new feature or UI workflow. No significant change to the existing SB UI is planned either. It should be possible to re-use existing test frameworks and extend existing test suites with new test cases similar to existing ones.

Dependences