49
Entwicklung mit JavaFX Die Java UI-Technologie im JDK 9 1 Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Wolfgang Weigend Sen. Leitender Systemberater Java Technologie und Architektur

Development with JavaFX 9 in JDK 9.0.1

Embed Size (px)

Citation preview

Page 1: Development with JavaFX 9 in JDK 9.0.1

Entwicklung mit JavaFX Die Java UI-Technologie im JDK 9

1 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Wolfgang Weigend

Sen. Leitender Systemberater

Java Technologie und Architektur

Page 2: Development with JavaFX 9 in JDK 9.0.1

The following is intended to outline our general

product direction. It is intended for information

purposes only, and may not be incorporated into

any contract. It is not a commitment to deliver any

material, code, or functionality, and should not be

2 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

material, code, or functionality, and should not be

relied upon in making purchasing decisions. The

development, release, and timing of any features

or functionality described for Oracle’s products

remains at the sole discretion of Oracle.

Page 3: Development with JavaFX 9 in JDK 9.0.1

Agenda

• Aktueller Status von JavaFX

• Entwicklungsressourcen beim Engineering und in der Java Community

• Linux on ARM Port

• JavaFX-Aufbau und Architekturkonzept

• Migration von Swing Komponenten

3 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Barrierefreiheit

• Vorteile bei der Entwicklung von JavaFX Anwendungen

• SceneBuilder GUI Editor

• Automatisiertes Testen von JavaFX GUI Komponenten

• Open Source Projekt OpenJFX

• Zusammenfassung

Page 4: Development with JavaFX 9 in JDK 9.0.1

Aktueller Status von JavaFX• JavaFX 8 ist fester Bestandteil der Java SE 8 und JavaFX 9 bei Java SE 9

– General Availability for Windows, Linux, Mac OS

– Java SE 8 Roadmap until 2025 and expected JDK 18.9 until 2028 with paid support

– Java SE Development Kit 8 Update 6 for ARM

• Starting with JDK 8u33, JavaFX Embedded is removed from the ARM bundle and is not supported

– http://www.oracle.com/technetwork/java/javase/jdk-8u33-arm-relnotes-2406696.html

4 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

– http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-January/016570.html

• Development Tools

– NetBeans 8.2 und NetBeans Developer Builds mit JDK 9.0.1

– JavaFX Scene Builder 2.0 und Scene Builder Version 8.4.1 für JDK 8

– e(fx)clipse

• major release cycle alignment with eclipse roadmap

• minor release cycle with JavaFX roadmap

Page 5: Development with JavaFX 9 in JDK 9.0.1

Entwicklungsressourcen beim Engineering und in der Java Community

• Development Team

– Kevin Rushforth

– Senior Engineering Manager

[email protected]

– Technical Writer and Documentation

5 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

– Technical Writer and Documentation

– Oracle Java Advanced Support

• Java Community

– Gluon

– MicroDoc Systems

– BestSolution.at EDV Systemhaus GmbH

– Saxonia Systems AG, Canoo Engineering AG, open knowledge GmbH

– Dirk Lemmermann and many other contributors

Page 6: Development with JavaFX 9 in JDK 9.0.1

JavaFX Day Cinema Düsseldorf 25th October 2017

6 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Page 7: Development with JavaFX 9 in JDK 9.0.1

Gluon Ignite libraryDependency Injection Frameworks in JavaFX applications

• With the Gluon Ignite library, developers can use popular dependency injection frameworks in their JavaFXapplications, including inside their FXML controllers

• Gluon Ignite creates a common abstraction over several popular dependency injection frameworks:– currently Guice, Spring, and Dagger, and plan to add more as the demand becomes obvious

• With full support of JSR-330 Gluon Ignite makes using dependency injection in JavaFX applications trivial

• Example of creating an application using the Guice framework and Gluon Ignite:

7 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Source: http://gluonhq.com/open-source/ignite/

Page 8: Development with JavaFX 9 in JDK 9.0.1

JavaFX Linux on ARM Port created by MicroDoc

• Agreement by Oracle and MicroDoc

• MicroDoc has started to create and deploy embedded runtimes in 1999

– MicroDoc worked with customers from a large variety of industries including Automotive, Telematics, Telecommunication, GSM Network Infrastructure, Building Automation, Smart Home, Smart Grid / Smart Metering, Mobile Computing, Airline Traffic Management, Security Systems, Laser Technology, Education

• MicroDoc creates Linux on ARM Port for JavaFX on their own

8 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• MicroDoc creates Linux on ARM Port for JavaFX on their own

– Source code and testing included

– As well for higher versions of Java, i.e. Java SE 9

• MicroDoc leds own projects

• MicroDoc Linux on ARM Port created and shipped

– OpenJFX 8 source with Multi-Touch JavaFX build for manufacturing customer in Austria

– Debian Linux

Source: https://www.microdoc.com/

Page 9: Development with JavaFX 9 in JDK 9.0.1

JavaFX Runtime Architektur

9 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

JavaFX Architektur Komponenten

• Glass Windowing Toolkit: Provides native operating services, such as managing the

windows, timers, and surfaces

• Prism: Graphics pipeline that can run on hardware and software renderers

• UI Toolkit: Ties Prism and Glass together and makes them available to the JavaFX APIs

Page 10: Development with JavaFX 9 in JDK 9.0.1

JavaFX Architektur

• Internal API

• Course-grained porting layer

− FX APIs isolated from

implementation details

10 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

implementation details

• Allows porting to completely

different systems

Page 11: Development with JavaFX 9 in JDK 9.0.1

JavaFX Architektur

• Quantum Toolkit ties Prism and Glass

Windowing Toolkit together and makes

them available to the JavaFX layer above

in the stack

11 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Quantum Toolkit manages the threading

rules related to rendering versus events

handling

Page 12: Development with JavaFX 9 in JDK 9.0.1

JavaFX Architektur

• Graphics API

− Converts the scene graph into

rendering calls

− Abstracts D3D, OpenGL*, Java2D

12 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

behind a “Graphics” object

− Handles “dirty regions”, clipping, and

other optimizations

− Font support

− Rasterization• Use hardware where possible− Fast paths using shaders for ellipses, rectangles, etc.

• Reduce context switches− Looking towards possible state sorting optimizations in the future

• Fallback to software rendering when necessary− Bad drivers are the main reason for doing so

* No direct OpenGL support

Page 13: Development with JavaFX 9 in JDK 9.0.1

JavaFX Architektur

• Windowing API

− Windows

− Mac

− Linux

13 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Provides basic OS services

− Drawing surface

− Input events

− Event queue

Page 14: Development with JavaFX 9 in JDK 9.0.1

Scenegraph• Instead of remove/add:

− group.getChildren().remove(node);

− group.getChildren().add(0, node);

• node.toFront()

JavaFX Scenegraph

14 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• node.toFront()

• node.toBack()

Scenegraph−node.toFront() −node.toBack()

Page 15: Development with JavaFX 9 in JDK 9.0.1

Displaying HTML in JavaFX

public class WebViewDemo extends Application {

public static void main(String[] args) {

launch(args);

}

@Override public void start(Stage stage) {

WebView webView = new WebView();

15 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

WebView webView = new WebView();

webView.getEngine().load("http://java.oracle.com");

Scene scene = new Scene(webView);

stage.setScene(scene);

stage.setTitle("Web View Demo");

stage.show();

}

}

Page 16: Development with JavaFX 9 in JDK 9.0.1

Class JFXPaneljava.lang.Object

java.awt.Component

java.awt.Container

private static void initFX(JFXPanel fxPanel) {

// This method is invoked on JavaFX thread

Scene scene = createScene();

fxPanel.setScene(scene);

}

JavaFX mit JFXPanel Komponente in Swing Anwendungen einbinden

public class Test {

private static void initAndShowGUI() {

// This method is invoked on Swing thread

JFrame frame = new JFrame("FX");

final JFXPanel fxPanel = new JFXPanel();

frame.add(fxPanel);

16 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

javax.swing.JComponentjavafx.embed.swing.JFXPanel

}

public static void main(String[] args) {

SwingUtilities.invokeLater(new Runnable() {

@Override

public void run() {

initAndShowGUI();

}

});

}

}

frame.add(fxPanel);

frame.setVisible(true);

Platform.runLater(new Runnable() {

@Override

public void run() {

initFX(fxPanel);

}

});

}

Page 17: Development with JavaFX 9 in JDK 9.0.1

WebView und Swing Interoperabilität

• Embed Web content in JavaFX applications

• HTML rendering based on WebKit*

Web View Component

• Embed JavaFX content into existing Swing applications

• Extend existing Swing

Swing and SWT Interop.

• Faster loading of JavaFX Web applications based on Prism

• Pre-loader for improved

Browser Plug-In

17 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

based on WebKit*

• Hardware accelerated rendering using PRISM

• Integration– DOM access and manipulation

– CSS User Styles

– Java-Calls to JS

– JS-Calls to Java

• Extend existing Swing applications with new JavaFX features such as WebView and high-performance graphics

• Applies to SWT-applications as well since JavaFX 2.1

• Pre-loader for improved user experience with JavaFX Web applications

* Updates with JDK 9 GA

Page 18: Development with JavaFX 9 in JDK 9.0.1

Swing to JavaFX Migration

• Swing UI Controls analysieren– Soll “Swing-Behavior” in JavaFX Migration mit eingebaut werden?

– Exakt gleiche Darstellung auf Pixel-Ebene?

• Layout Manager – Teilweise automatisch überführen

18 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

– Teilweise automatisch überführen

– Manuelle Tätigkeit

• Geschäftslogik/Code entflechten– Wie stark ist die Verzahnung von Code & UI?

• Fachlicher Freeze während der Migration, mit dem Zieleiner möglichst kurzen Code-Freeze-Phase

Page 19: Development with JavaFX 9 in JDK 9.0.1

Barrierefreiheit mit JavaFX

• GUI can be made more accessible by providing screen reader devices which speak graphical content to blind people

• JavaFX accessibility on Microsoft Windows and Mac OS X

– By providing support for reading JavaFX controls via a screen reader

• Apple's VoiceOver for the Mac, Microsoft's Narrator for Windows

Accessibility support with JDK 8 Update 40

19 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Apple's VoiceOver for the Mac, Microsoft's Narrator for Windows

• Job Access With Speech (JAWS) Screen Reader for Windows by Freedom Scientific

– By providing JavaFX controls that are traversable using the keyboard

• By supporting a special high-contrast mode that makes controls more visible to

users

– this mode is activated on Windows by pressing Alt+Left Shift+Print Screen

Source: http://www.javaworld.com/article/2991463/learn-java/javafx-improvements-in-java-se-8u40.html

Page 20: Development with JavaFX 9 in JDK 9.0.1

JavaFX supports accessibility by adding the following properties to the javafx.scene.Node class

• accessibleRoleProperty

– Node's accessible role, which is a value of the javafx.scene.AccessibleRole

enumerated type that identifies the kind of control to the screen reader

– E.g., AccessibleRole.BUTTON or AccessibleRole.MENU.

– The screen reader uses a node's role to identify supported attributes and actions

• accessibleRoleDescriptionProperty

20 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• accessibleRoleDescriptionProperty

– Node's role description, which is a string

• accessibleTextProperty

– Node's accessible text, which is a string

• accessibleHelpProperty

– Node's accessible help, which is a string

• javafx.scene.control.Label labelFor-property is used by a

screen reader to provide more information to the userSource: http://www.javaworld.com/article/2991463/learn-java/javafx-improvements-in-java-se-8u40.html

Page 21: Development with JavaFX 9 in JDK 9.0.1

JavaFX provides an advanced API for interacting with screen reader and accessing accessibility state

• Advanced API includes the javafx.scene.AccessibleAction and javafx.scene.AccessibleAttribute enumerated types along with the following Node methods:

– Object queryAccessibleAttribute(AccessibleAttribute attribute,

Adv. API to introduce accessibility support to own controls or other nodes

21 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

– Object queryAccessibleAttribute(AccessibleAttribute attribute,

Object... parameters)

– void executeAccessibleAction(AccessibleAction action, Object...

parameters)

– Void notifyAccessibleAttributeChanged(AccessibleAttribute

attributes)

Source: http://www.javaworld.com/article/2991463/learn-java/javafx-improvements-in-java-se-8u40.html

Page 22: Development with JavaFX 9 in JDK 9.0.1

Java Entwicklungswerkzeuge

• Source editor with improved syntactic

highlighting, code completion, refactoring etc.

• Full debugger and profiler support

• Project wizard for easy creation of JavaFX

applications

22 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

applications

Other Java IDE’s

• Source editor with syntactic highlighting,

code completion, refactoring etc.

• Full debugger and Profiler support

Page 23: Development with JavaFX 9 in JDK 9.0.1

jdeps - Java-Class-Dependency-Analyzer JDK 9.0.1 (1)

C:\jdk-9.0.1\JavaFXApplication3\dist> jdeps -profile JavaFXApplication3.jar

JavaFXApplication3.jar -> C:\Program Files (x86)\Java\jdk1.8.0_45\jre\lib\ext\jfxrt.jar

JavaFXApplication3.jar -> C:\Program Files (x86)\Java\jdk1.8.0_45\jre\lib\rt.jar (compact1)

javafxapplication3 (JavaFXApplication3.jar)

-> java.io compact1

-> java.lang compact1

-> javafx.application jfxrt.jar

-> javafx.collections jfxrt.jar

23 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

-> javafx.collections jfxrt.jar

-> javafx.event jfxrt.jar

-> javafx.scene jfxrt.jar

-> javafx.scene.control jfxrt.jar

-> javafx.scene.layout jfxrt.jar

-> javafx.stage jfxrt.jar

C:\jdk-9.0.1\JavaFXApplication3\dist> jdeps -v JavaFXApplication3.jar

C:\jdk-9.0.1\bin> jdeps --generate-module-info C:\jdk-9.0.1\JavaFXApplication3\distc:\jdk-

9.0.1\JavaFXApplication3\dist\JavaFXApplication3.jar

writing to C:\jdk-9.0.1\JavaFXApplication3\dist\JavaFXApplication3\module-info.java

Page 24: Development with JavaFX 9 in JDK 9.0.1

jdeps - Java-Class-Dependency-Analyzer JDK 9.0.1 (2)

C:\jdk-9.0.1\bin> jdeps --generate-module-info C:\jdk-

9.0.1\JavaFXApplication3\distc:\jdk9.0.1\JavaFXApplication3\dist\JavaFXApplication3.jar

writing to C:\jdk-9.0.1\JavaFXApplication3\dist\JavaFXApplication3\module-info.java

C:\jdk-9.0.1\JavaFXApplication3\dist\JavaFXApplication3> dir

25.10.2017 10:36 171 module-info.java

24 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

C:\jdk-9.0.1\JavaFXApplication3\dist\JavaFXApplication3> type module-info.java

module JavaFXApplication3 {

requires javafx.base;

requires javafx.controls;

requires transitive javafx.graphics;

exports javafxapplication3;

}

Page 25: Development with JavaFX 9 in JDK 9.0.1

jdeps - Java-Class-Dependency-Analyzer JDK 9.0.1 (3)

C:\jdk-9.0.1\bin> jdeps --module-path C:\jdk-9.0.1\JavaFXApplication3\dist -s -dotoutput c:\jdk-

9.0.1\JavaFXApplication3\dist c:\jdk-9.0.1\JavaFXApplication3\dist\JavaFXApplication3.jar

C:\jdk-9.0.1\JavaFXApplication3\dist> type summary.dot

digraph "summary" {

"JavaFXApplication3.jar" -> "java.base (java.base)";

"JavaFXApplication3.jar" -> "javafx.base (javafx.base)";

"JavaFXApplication3.jar" -> "javafx.controls (javafx.controls)";

"JavaFXApplication3.jar" -> "javafx.graphics (javafx.graphics)";

25 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

"JavaFXApplication3.jar" -> "javafx.graphics (javafx.graphics)";

}

http://www.webgraphviz.com/

Page 26: Development with JavaFX 9 in JDK 9.0.1

Design Objectives

Oracle’s next generation Java client solution

• Built on Java in Java

• Modular architecture

• Migration path for Java client UI technologies

JavaFX – Moving Client Forward

26 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Migration path for Java client UI technologies

• Advanced tooling

• Delivering on the cross-platform promise

Page 27: Development with JavaFX 9 in JDK 9.0.1

Design Objectives

• Defining a Property

• Using a ChangeListener

• Using the High-Level Binding API

– The High-Level API is the quickest way to use bindings in applications

– It consists of two parts: the Fluent API, and the Bindings class

JavaFX – Properties and Bindings

27 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

– It consists of two parts: the Fluent API, and the Bindings class

• The Fluent API exposes methods on the various dependency objects, where as the Bindings class provides static factory methods instead

– Bindings Class could used to do the same thing too

• Exploring Observable, ObservableValue, InvalidationListener, and ChangeListener

– Using an InvalidationListener

• Using the Low-Level Binding API

Source: https://docs.oracle.com/javafx/2/binding/jfxpub-binding.htm

Page 28: Development with JavaFX 9 in JDK 9.0.1

Java APIs und FXML

Java APIs für JavaFX

• End-to-end Java development

• Java language features - generics, annotations, multi-threading

• Fluent API for UI construction

FXML

• Scriptable, XML-based markup language for defining UI

• Convenient alternative to developing UI programmatically in Java

28 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Fluent API for UI construction

• Alternative JVM supported languages (e.g. Groovy, Scala) with JavaFX

• Leverage sophisticated Java IDEs, debuggers and profilers

• Java APIs preserve convenient JavaFX Script features (e.g., bind)

programmatically in Java

• Easy to learn and intuitive for developers familiar with web technologies or other markup based UI technologies

• Powerful scripting feature allows embedding scripts within FXML. Any JVM scripting language can be used, including JavaScript, Groovy, and Scala

Page 29: Development with JavaFX 9 in JDK 9.0.1

Modena Modern Theme – Since JavaFX 8

29 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Page 30: Development with JavaFX 9 in JDK 9.0.1

Rich Text - Since JavaFX 8

• Use Cases

– text editor, code editor

– mixed style Labels, buttons, cells, headings, descriptions, large textual content, etc.

• Details

30 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Details

– TextFlow, a new layout container

– Text is just a node… so you can add effects, event handlers, and animations

– You can also use CSS, FXML

Page 31: Development with JavaFX 9 in JDK 9.0.1

TreeTableView - Since JavaFX 8

• Goal: reuse as many API, or API concepts, as possible from

the TreeView and TableView controls API

31 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Page 32: Development with JavaFX 9 in JDK 9.0.1

DatePicker - Since JavaFX 8

32 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Page 33: Development with JavaFX 9 in JDK 9.0.1

Public API for CSS structure - Since JavaFX 8

• CSS styling is one of the key features for JavaFX

• CSS has been implemented exclusively in private API (com.sun.javafx.css package)

• Tools (e.g. Scene Builder) require a CSS public API

33 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Tools (e.g. Scene Builder) require a CSS public API

• Developers will be able to define custom CSS styles

Page 34: Development with JavaFX 9 in JDK 9.0.1

Hello World in JavaFXProgramming in Javapublic class JavaFXExample extends Application {

@Override public void start(Stage stage){

Scene scene = new Scene(

LabelBuilder.create()

.text("Hello World!")

.layoutX(25)

34 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

.build());

stage.setTitle("Welcome to JavaFX!");

stage.setScene(scene);

stage.show();

}

public static void main(String[] args) {

launch(args);

}

}

Page 35: Development with JavaFX 9 in JDK 9.0.1

Hello World in JavaFXProgramming in FXML und JavaFXML<BorderPane>

<center>

<Label text=”%helloworld"/>

</center>

</BorderPane>

Java

35 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Javapublic class FXMLExample extends Application {

@Override public void start(Stage stage) throws Exception {

stage.setTitle("FXML Example");

Parent root = FXMLLoader.load(getClass().getResource(“example.fxml"),

ResourceBundle.getBundle(“r.fxml_example"));

stage.setScene(new Scene(root));

stage.show();

}

public static void main(String[] args) { launch(args); }

}

Page 36: Development with JavaFX 9 in JDK 9.0.1

JavaFX Scene Builder 2.0

36 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

http://www.oracle.com/technetwork/java/javase/downloads/sb2download-2177776.html

Page 37: Development with JavaFX 9 in JDK 9.0.1

JavaFX Scene Builder

• UI layout tool for JavaFX

• FXML visual editor

• Can be used standalone or with all major Java IDEs

– Tighter integration with NetBeans IDE

37 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

– Tighter integration with NetBeans IDE

• Preview mode

• CSS support

• Supported on Windows and Mac OS X

Page 38: Development with JavaFX 9 in JDK 9.0.1

Gluon supports Scene Builder for Java SE 9.0.1

• Scene Builder only as source code within the OpenJFX project

• Gluon provides Scene Builder builds

– Actively work on improvements to Scene Builder, in a public repo, to further drive the

functionality of Scene Builder forward

– These builds will be the Oracle bits, with additional improvements based on community

involvement and our desires to better support third party projects such as ControlsFX,

FXyz, DataFX, others

38 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

FXyz, DataFX, others

• Downloads:• Scene Builder is

open source and licensed

under the BSD license

• Scene Builder version for

Java 9.0.1 was released

on 17th of October 2017

The latest version of Scene Builder for Java 8 is 8.4.1, it was released on 17th of October 2017

Source: http://gluonhq.com/open-source/scene-builder/

Page 39: Development with JavaFX 9 in JDK 9.0.1

Funktionale Systemtests für JavaFXAutomatisiertes Testen für JavaFX UI Controls

39 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

QF-TestFirma Quality First Software

Professionelles GUI-Testen für

Java & Web www.qfs.de

•Functional Testing•UI Controls•Scenegraph

Page 40: Development with JavaFX 9 in JDK 9.0.1

QF-Test und JavaFX 8 und künftig für JavaFX 9

• JavaFX ist eine pure Java-Anbindung analog Swing

• QF-Test Version 4.1.5 mit offizielle Unterstützung für Java 8 / JavaFX 8

• Die kommende Version QF-Test 4.2 unterstützt Java 9 / JavaFX 9

• Wenn Sie bereits jetzt Java 9 Anwendungen testen möchten, können Sie eine Vorabversion von QF-Test 4.2 per E-Mail an [email protected] anfordern.

40 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

eine Vorabversion von QF-Test 4.2 per E-Mail an [email protected] anfordern.

Java Swing

Eclipse/SWT

Web

Page 41: Development with JavaFX 9 in JDK 9.0.1

QF-Test & JavaFX 8 – GUI Testautomatisierung

41 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Page 42: Development with JavaFX 9 in JDK 9.0.1

JavaFX in the Browserhttp://www.jpro.io/

42 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

jpro is a new technology which brings Java back into the browser - without Java Plugin. To achieve that, jpro runs JavaFX on the server and maps its scenegraph directly into the browser

The client side rendering is highly optimized with browser side approximations and browser side rendering to get a smooth user experience free of lags

© 2017 jpro technologies AG

Page 43: Development with JavaFX 9 in JDK 9.0.1

jpro architecture - JavaFX in the browserThin client model

43 Copyright © 2017 Oracle and/or its affiliates. All rights reserved. © 2017 jpro technologies AG

Page 44: Development with JavaFX 9 in JDK 9.0.1

JavaFX und Open Sourcehttp://openjdk.java.net/projects/openjfx

44 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

OpenJFX•UI Controls•Scenegraph•JemmyFX

Page 45: Development with JavaFX 9 in JDK 9.0.1

Open Source und Standardisierung

• JavaFX source code being contributed as part of OpenJFXhttp://openjdk.java.net/projects/openjfx/

– Source code being contributed in phases

– Open sourced as of March 2013

• UI Controls

45 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Scene Graph

• JemmyFX

• Functional Tests

• JavaFX via OpenJFX towards OpenJDK under discussion

Page 46: Development with JavaFX 9 in JDK 9.0.1

JavaFX goes Open SourceiOS- und Android-Implementierungen

• iOS- und Android-Implementierungen sind Open Source• Lizensierung mit eigenem Applikations-Co-Bundle

46 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

Page 47: Development with JavaFX 9 in JDK 9.0.1

JavaFXPorts: JavaFX on Mobile and TabletsPackage your JavaFX Application for deployment on iOS and Android

• JavaFX on client, desktop, laptop and embedded systems

• JavaFX on mobile and tablets

• JavaFXPorts 8.60.9 released

• Why is a port needed? - Isn't Java Write Once Run Anywhere?

47 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

• Why is a port needed? - Isn't Java Write Once Run Anywhere?

� OpenJDK

http://javafxports.org/page/home

Page 48: Development with JavaFX 9 in JDK 9.0.1

Zusammenfassung

� JavaFX is the strategic Java UI technology for rich client applications

� Unified development of Java and Web applications

• Browser Plug-in, Web Start, Native Executables

• Hardware Accelerated Graphics (DirectX, ..)

• JavaFX Web View based on WebKit

‒ JavaFX with WebView for HTML5 features

48 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.

‒ JavaFX with WebView for HTML5 features

‒ Improved JavaScript Engine

‒ JavaFX as applet integrated to run in a web page

• IDE support for Eclipse e(fx)clipse, IntelliJ, IDEA, NetBeans, etc.

• Private vs. JavaFX Public API with JDK 9

� Wanted JavaFX for mobile operating systems iOS & Android - desirable

� Developer community could make use of the JavaFX Open Source process

• Get hands-on porting for iOS and Android

Page 49: Development with JavaFX 9 in JDK 9.0.1

Danke!

[email protected]

Twitter: wolflook

49 Copyright © 2017 Oracle and/or its affiliates. All rights reserved.