Software:JavaFX
Developer(s) | Oracle Corporation |
---|---|
Initial release | December 4, 2008 |
Stable release | 20.0.1
/ April 19, 2023[1] |
Operating system | Java |
Platform | Cross-platform |
Available in | Java |
Type | Application framework |
License | GPL+classpath exception[2] |
Website | wiki |
Java platform editions |
---|
|
JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers[citation needed] on Microsoft Windows, Linux (including Raspberry Pi), and macOS, as well as mobile devices running iOS and Android, through Gluon Mobile.
With the release of JDK 11 in 2018, Oracle made JavaFX part of the OpenJDK under the OpenJFX project,[3] in order to increase the pace of its development.[4]
Open-source JavaFXPorts works for iOS (iPhone and iPad) and Android.[5] The related commercial software created under the name "Gluon" supports the same mobile platforms with additional features plus desktop.[6] This allows a single source code base to create applications for the desktop, iOS, and Android devices.
Features
JavaFX 1.1 was based on the concept of a "common profile" that is intended to span across all devices supported by JavaFX. This approach makes it possible for developers to use a common programming model while building an application targeted for both desktop and mobile devices and to share much of the code, graphics assets and content between desktop and mobile versions. To address the need for tuning applications on a specific class of devices, the JavaFX 1.1 platform includes APIs that are desktop or mobile-specific. For example, the JavaFX Desktop profile includes Swing and advanced visual effects.
For the end user, the "Drag-to-Install" feature enables them to drag a JavaFX widget - an application residing in a website - and drop it onto their desktop. The application will not lose its state or context even after the browser is closed. An application can also be re-launched by clicking on a shortcut that gets created automatically on the user's desktop. This behavior is enabled out-of-the-box by the Java applet mechanism since the Java 6u10 update, and is leveraged by JavaFX from the underlying Java layer. Sun touts "Drag-to-Install" as opening up of a new distribution model and allowing developers to "break away from the browser".
JavaFX 1.x included a set of plug-ins for Adobe Photoshop and Illustrator that enable advanced graphics to be integrated directly into JavaFX applications. The plug-ins generate JavaFX Script code that preserves the layers and structure of the graphics. Developers can then add animation or effects to the static graphics imported. There is also an SVG graphics converter tool (also known as Media Factory) that allows for importing graphics and previewing assets after the conversion to JavaFX format.
Before version 2.0 of JavaFX, developers used a statically typed, declarative language called JavaFX Script to build JavaFX applications. Because JavaFX Script was compiled to Java bytecode, programmers could also use Java code instead. JavaFX applications could run on any desktop that could run Java SE.[7]
JavaFX 2.0 and later is implemented as a "native" Java library, and applications using JavaFX are written in "native" Java code. JavaFX Script has been scrapped by Oracle, but development is being continued in the Visage project.[8] JavaFX 2.x does not support the Solaris operating system or mobile phones; however, Oracle plans to integrate JavaFX to Java SE Embedded 8, and JavaFX for ARM processors is in developer preview phase.[9]
Sun Microsystems licensed a custom typeface called Amble for use on JavaFX-powered devices. The font family was designed by mobile user interface design specialists Punchcut and is available as part of the JavaFX SDK 1.3 Release.
WebView
This book may need to be updated to reflect current knowledge. |
WebView, the embedded browser component, uses the WebKit browser engine and supports the following HTML5 features:
- Canvas
- Media playback
- Form controls (except for <input type="color"> )
- Editable content
- History maintenance
- Support for the <meter> and <progress> tags
- Support for the <details> and <summary> tags
- DOM
- MathML
- SVG
- JavaScript and CSS
JavaFX Mobile
This book may need to be updated to reflect current knowledge. |
JavaFX Mobile was the implementation of the JavaFX platform for rich web applications aimed at mobile devices. JavaFX Mobile 1.x applications can be developed in the same language, JavaFX Script, as JavaFX 1.x applications for browser or desktop, and using the same tools: JavaFX SDK and the JavaFX Production Suite. This concept makes it possible to share code-base and graphics assets for desktop and mobile applications. Through integration with Java ME, the JavaFX applications have access to capabilities of the underlying handset, such as the filesystem, camera, GPS, bluetooth or accelerometer.
An independent application platform built on Java, JavaFX Mobile is capable of running on multiple mobile operating systems, including Android, Windows Mobile, and proprietary real-time operating systems.
JavaFX Mobile was publicly available as part of the JavaFX 1.1 release announced by Sun Microsystems on February 12, 2009.
Sun planned to enable out-of-the-box support of JavaFX on the devices by working with handset manufacturers and mobile operators to preload the JavaFX Mobile runtime on the handsets. JavaFX Mobile running on an Android was demonstrated at JavaOne 2008 and selected partnerships (incl. LG Electronics, Sony Ericsson) were announced at the JavaFX Mobile launch in February, 2009.
Components
The JavaFX platform includes the following components:
- The JavaFX SDK: Including among other things graphics, media services, rich text libraries, and the web view.
- NetBeans IDE for JavaFX: NetBeans with drag-and-drop palette to add objects with transformations, effects and animations plus a set of samples and best practices. For Eclipse users there is a community-supported plugin hosted on e(fx)clipse.
- JavaFX Scene Builder: This was introduced for JavaFX 2.1 and later. A user interface (UI) is created by dragging and dropping controls from a palette. The layout is saved as an FXML file, a special XML format.
History
Releases after version bump
JavaFX is now part of the JRE/JDK for Java 8 (released on March 18, 2014) and has the same numbering, i.e., JavaFX 8.[10]
JavaFX 8 adds several new features, including:[11]
- Support for 3D graphics[12][13]
- Sensor support
- MathML support, with JavaFX 8 Update 192
- Printing and rich text support
- Generic dialog templates via inclusion of ControlsFX to replace JOptionPane as of JavaFX 8u40[14]
JavaFX 9 features were centered on extracting some useful private APIs from the JavaFX code to make these APIs public:
Oracle announced their intention to stop shipping JavaFX with JDK 11 and later.[16] It is no longer bundled with the latest version.
JavaFX 11 was first shipped in September 2018.
- JavaFX 11.0.2 is the latest public release of JavaFX 11.[17]
- JavaFX 11.0.16 is the latest release of JavaFX 11 for those with a long-term support contract.[18]
- MathML support, with JavaFX 11
- FX Robot API
JavaFX 12 was first shipped in March 2019.
- JavaFX 12.0.1.[17]
JavaFX 13 shipped in September 2019.
JavaFX 14 was released in March 2020.
JavaFX 15 was released in September 2020.
JavaFX 16 was released in March 2021.
JavaFX 17 was released in September 2021. Highlights:
- 3D SpotLight type
- Load images and stylesheets from inline data-URIs
- Print to files
- Query states of CAPS LOCK and NUM LOCK keys
- Support for multiple screens in the window toolkit for embedded platforms
JavaFX 18 was released in March 2022. Highlights:
- Support for the H.265/HEVC media codec in the video player
- 3D DirectionalLight type
- Transparent backgrounds in WebView
- Set the "managed" property of nodes from CSS
- Factory methods for Border and Background
JavaFX 19 was released in September 2022. Highlights:
- Support for the H.265/HEVC HTTP Live Streaming in the video player
- Fluent bindings with lambdas: map, flatMap and orElse
- :focus-visibile and :focus-within CSS pseudo-classes
JavaFX 20 was released in March 2023. Highlights:
- Constrained resize policies for TableView and TreeTableView
- Improved lifecycle of UI controls skins (Skin::install)
- A simplified and deterministic way to manage listeners (ObservableValue::when)[19]
Early releases
JavaFX Script, the scripting component of JavaFX, began life as a project by Chris Oliver called F3.[20]
Sun Microsystems first announced JavaFX at the JavaOne Worldwide Java Developer conference in May 2007.
In May 2008 Sun Microsystems announced plans to deliver JavaFX for the browser and desktop by the third quarter of 2008, and JavaFX for mobile devices in the second quarter of 2009. Sun also announced a multi-year agreement with On2 Technologies to bring comprehensive video capabilities to the JavaFX product family using the company's TrueMotion Video codec. Since end of July 2008, developers could download a preview of the JavaFX SDK for Windows and Macintosh, as well as the JavaFX plugin for NetBeans 6.1.
Major releases since JavaFX 1.1 have a release name based on a street or neighborhood in San Francisco . Update releases typically do not have a release name.[21]
On December 4, 2008, Sun released JavaFX 1.0.2.
JavaFX for mobile development was finally made available as part of the JavaFX 1.1 release (named Franca[21]) announced officially on February 12, 2009.
JavaFX 1.2 (named Marina[21]) was released at JavaOne on June 2, 2009. This release introduced:[22]
- Beta support for Linux and Solaris
- Built-in controls and layouts
- Skinnable CSS controls
- Built-in chart widgets
- JavaFX I/O management, masking differences between desktop and mobile devices
- Speed improvements
- Windows Mobile Runtime with Sun Java Wireless Client
JavaFX 1.3 (named Soma[21]) was released on April 22, 2010. This release introduced:[23]
- Performance improvements
- Support of additional platforms
- Improved support for user interface controls
JavaFX 1.3.1 was released on August 21, 2010. This release introduced:
- Quick startup time of JavaFX application
- Custom progress bar for application startup
JavaFX 2.0 (named Presidio[21]) was released on October 10, 2011. This release introduced:
- A new set of Java APIs opening JavaFX capabilities to all Java developers, without the need for them to learn a new scripting language. JavaFX Script support was dropped permanently.
- Support for high performance lazy binding, binding expressions, bound sequence expressions, and partial bind re-evaluation.
- Dropping support for JavaFX Mobile.
- Oracle announcing its intent to open-source JavaFX.
- JavaFX runtime turning to be platform-specific, utilizing system capabilities, as video codec available on the system; instead of implementing only one cross-platform runtime as with JavaFX 1.x.
Various improvements have been made within the JavaFX libraries for multithreading. The Task APIs have been updated to support much more concise threading capabilities (i.e. the JavaTaskBase class is no longer necessary since all the APIs are in Java, and the requirement to have a callback interface and Java implementation class are no longer necessary). In addition, the scene graph has been designed to allow scenes to be constructed on background threads and then attached to "live" scenes in a threadsafe manner.
On May 26, 2011, Oracle released the JavaFX 2.0 Beta. The beta release was only made available for 32 and 64 bit versions of Microsoft Windows XP, Windows Vista and Windows 7. An Early Access version for Mac OS X was also available for members of the JavaFX Partner Program at the time, while Linux support was planned for a future release of JavaFX. JavaFX 2.0 was released with only Windows support. Mac OS X support was added with JavaFX 2.1. Linux support was added with JavaFX 2.2.
JavaFX 2.0 makes use of a new declarative XML language called FXML.[24][25]
On April 27, 2012, Oracle released version 2.1 of JavaFX,[26] which includes the following main features:[27]
- First official version for OS X (desktop only)
- H.264/MPEG-4 AVC and Advanced Audio Coding support
- CoolType text
- UI enhancements including combo box controls, charts (stacked chart), and menu bars
- Webview component now allows JavaScript to make calls to Java methods
On August 14, 2012, Oracle released version 2.2 of JavaFX,[28] which includes the following main features:[29]
- Linux support (including plugin and webstart)
- Canvas
- New controls: Color Picker, Pagination
- HTTP Live Streaming support
- Touch events and gestures
- Image manipulation API
- Native Packaging
JavaFX 2.2 adds new packaging option called Native Packaging, allowing packaging of an application as a "native bundle". This gives users a way to install and run an application without any external dependencies on a system JRE or FX SDK.
As of Oracle Java SE 7 update 6 and JavaFX 2.2, JavaFX is bundled to be installed with Oracle Java SE platform.[10]
Future work
Oracle also announced in November 2012 the open sourcing of Decora, a DSL Shader language for JavaFX allowing to generate Shaders for OpenGL and Direct3D.[30]
Oracle wrote in its Client Support Roadmap that JavaFX new fixes will continue to be supported on Java SE 8 through March 2025.[31] Previously, Oracle announced that they are "working with interested third parties to make it easier to build and maintain JavaFX as a separately distributable open-source module." JavaFX will continue to be supported in the future by the company Gluon as a downloadable module in addition to the JDK.[32]
Availability
As of March 2014 JavaFX is deployed on Microsoft Windows, OS X, and Linux.[33] Oracle has an internal port of JavaFX on iOS and Android.[34][35] Support for ARM is available starting with JavaFX 8[36] On February 11, 2013, Richard Bair, chief architect of the Client Java Platform at Oracle, announced that Oracle would open-source the iOS and Android implementations of its JavaFX platform in the next two months.[37][38]
Starting with version 8u33 of JDK for ARM, support for JavaFX Embedded has been removed.[39]
Support will continue for x86-based architectures.[40]
A commercial port of JavaFX for Android and iOS has been created under the name "Gluon".[6]
License
There are various licenses for the modules that compose the JavaFX runtime:
- The JavaFX compiler[41] and an older version of the 2D Scene graph[42] are released under a GPL v2 license,
- The NetBeans plugin for JavaFX is dual licensed under GPL v2 and CDDL.[43]
During development, Sun explained they will roll out their strategy for the JavaFX licensing model for JavaFX first release.[44] After the release in 2008, Jeet Kaul, Sun's Vice president for Client Software, explained that they will soon publish a specification for JavaFX and its associated file formats, and will continue to open-source the JavaFX runtime, and decouple this core from the proprietary parts licensed by external parties.[45]
At JavaOne 2011, Oracle Corporation announced that JavaFX 2.0 would become open-source.[24] Since December 2011, Oracle began to open-source the JavaFX code under the GPL+linking exception.[2][46][unreliable source?]
In December 2012, new portions of the JavaFX source code were open-sourced by Oracle:[47]
- the animations and timelines classes
- the event delivery mechanism and other various core classes
- the render tree interface, and the implementation of this interface
- the geometry and shapes implementation
- the Java part of the rendering engine used in the rendering pipeline
- the logging support
See also
References
- ↑ "OpenJFX 19 Release Notes". https://gluonhq.com/products/javafx/openjfx-20-release-notes/.
- ↑ 2.0 2.1 "OpenJFX Project". Oracle Corporation. https://openjdk.java.net/projects/openjfx/.
- ↑ "JavaFX Developer Home". https://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html.
- ↑ Smith, Donald (March 7, 2018). "The Future of JavaFX and Other Java Client Roadmap Updates". https://blogs.oracle.com/java-platform-group/the-future-of-javafx-and-other-java-client-roadmap-updates.
- ↑ "JavaFXPorts - Gluon" (in en-US). Gluon. https://gluonhq.com/products/mobile/javafxports/.
- ↑ 6.0 6.1 "Rapid Enterprise Mobile Apps: Build, Connect, Manage with Gluon". 2017-12-16. https://gluonhq.com/.
- ↑ "JavaFX Overview (Release 8)". 2014. https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm.
- ↑ "Google Code Archive - Long-term storage for Google Code Project Hosting". https://code.google.com/p/visage/.
- ↑ "JavaFX roadmap". https://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html.
- ↑ 10.0 10.1 "JavaFX FAQ". https://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html.
- ↑ "JavaFX Roadmap". Oracle Corporation. https://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html.
- ↑ Yang, Chien. "3D Features Planned for Version 8". Oracle Corporation. https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-October/003641.html.
- ↑ "3D Features Planned for Version 8". Oracle Corporation. https://wikis.oracle.com/display/OpenJDK/3D+Features.
- ↑ "Dialog (JavaFX 9)". http://download.java.net/jdk9/jfxdocs/javafx/scene/control/Dialog.html.
- ↑ Giles, Jonathan (2015-01-14). "JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization". Oracle Corporation. https://openjdk.java.net/jeps/253.
- ↑ Gluon and JavaFX
- ↑ 17.0 17.1 "javafxports/openjdk-jfx" (in en). https://github.com/javafxports/openjdk-jfx.
- ↑ "JavaFX" (in en-US). https://gluonhq.com/products/javafx/.
- ↑ (in en) JavaFX 20 and Beyond, https://www.youtube.com/watch?v=f8TOo8TL4-k, retrieved 2023-06-20
- ↑ "F3 ( Chris Oliver's Weblog)". 2012-01-06. https://blogs.oracle.com/chrisoliver/entry/f3.
- ↑ 21.0 21.1 21.2 21.3 21.4 "Repositories and Releases". 2013-06-29. https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases.
- ↑ Marinacci, Joshua (2009-06-09). "Top 5 Most Important Features in JavaFX 1.2". http://weblogs.java.net/blog/joshy/archive/2009/06/top_5_most_impo.html.
- ↑ "JavaFX 1.3 Released, Improves User Experiences". 2010-04-22. http://blogs.sun.com/javafx/entry/javafx_1_3_released_delivers.
- ↑ 24.0 24.1 Meyer, David (2011-10-06). "JavaFX 2.0 arrives and heads for open source". ZDNet. http://www.zdnet.co.uk/news/application-development/2011/10/06/javafx-20-arrives-and-heads-for-open-source-40094121/.
- ↑ Brown, Greg (2011-08-15). "Introducing FXML". http://fxexperience.com/wp-content/uploads/2011/08/Introducing-FXML.pdf.
- ↑ "JDK 7u4 and JavaFX 2.1 released, now also including Mac OS X | Across the Universe". 2012-04-27. http://terrencebarr.wordpress.com/2012/04/27/jdk-7u4-and-javafx-2-1-released-now-also-including-mac-os-x/.
- ↑ "JavaFX 2.1 Release Notes". Oracle Corporation. https://docs.oracle.com/javafx/2/release_notes_2-1/jfxpub-release_notes_2-1.htm.
- ↑ "What's new in JavaFX 2.2 (The JavaFX Blog)". https://blogs.oracle.com/javafx/entry/what_s_new_in_javafx.
- ↑ "JavaFX 2.2 Release Notes". Oracle Corporation. https://docs.oracle.com/javafx/2/release_notes_2-2/jfxpub-release_notes_2-2.htm.
- ↑ Bair, Richard (2012-11-06). "Open Sourcing: decora-compiler". Oracle Corporation. https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-November/004292.html.
- ↑ "Oracle Java SE Support Roadmap". Oracle. 2020-05-13. https://www.oracle.com/technetwork/java/java-se-support-roadmap.html.
- ↑ JavaFX
- ↑ "General Availability Download". Oracle Corporation. https://www.oracle.com/technetwork/java/javafx/downloads/index.html.
- ↑ Bair, Richard (2012-12-03). "Porting JavaFX". https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004670.html.
- ↑ Brandalik, Tomas (2012-12-07). "Survey: JavaFX on tablets and mobile devices". https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/004787.html.
- ↑ "1 JavaFX Overview (Release 8)". https://docs.oracle.com/javase/8/javafx/get-started-tutorial/jfx-overview.htm.
- ↑ Bair, Richard (2013-02-16). "February Open Source Update". Oracle Corporation. http://fxexperience.com/2013/02/february-open-source-update/.
- ↑ "Oracle Announces Open Source JavaFX for iOS and Android". Infoq.com. 2013-02-13. http://www.infoq.com/news/2013/02/javafx-ios-android.
- ↑ "JDK for ARM 8u33 release notes". Oracle Corporation. 2013-02-16. https://www.oracle.com/technetwork/java/javase/jdk-8u33-arm-relnotes-2406696.html.
- ↑ Topic, Dalibor (2013-01-27). "Raspberry Pi's mailing list: Where's JavaFX in recent Java 8u33 for the ARM ?". https://www.raspberrypi.org/forums/viewtopic.php?f=81&t=97367&p=678791#p678791.
- ↑ "OpenJFX Compiler Project". http://openjfx-compiler.dev.java.net/.[yes|permanent dead link|dead link}}]
- ↑ "Project Scene Graph home". http://scenegraph.dev.java.net/.
- ↑ "JavaFX Downloads". http://openjfx.dev.java.net/downloads.html.[yes|permanent dead link|dead link}}]
- ↑ "Will JavaFX technology be released in open source?". http://java.sun.com/javafx/faqs.jsp#2.
- ↑ Kaul, Jeet (2008-12-16). "JavaFX — the road ahead". http://blogs.sun.com/meetjeet/entry/javafx_the_road_ahead.
- ↑ Bair, Richard (2011-12-02). "Call for patches". Oracle Corporation. https://forums.oracle.com/forums/thread.jspa?messageID=10017677.
- ↑ Safrata, Pavel (2012-12-18). "More of JavaFX open-sourced". Oracle Corporation. https://mail.openjdk.java.net/pipermail/openjfx-dev/2012-December/005007.html.
Bibliography
- Vos, Johan; Gao, Weiqi; Chin, Stephen; Iverson, Dean; Weaver, James L. (July 27, 2014). Pro JavaFX 8: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients. Apress. p. 616. ISBN 978-1-4302-6574-0. https://www.apress.com/9781430265740.
- Weaver, James L.; Gao, Weiqi; Chin, Stephen; Iverson, Dean; Vos, Johan (March 6, 2012). Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology. Apress. p. 640. ISBN 978-1-4302-6872-7. http://www.apress.com/9781430268727.
- Ebbers, Hendrik (July 7, 2014). Mastering JavaFX 8 Controls. McGraw-Hill Education. p. 336. ISBN 978-0071833776. http://www.guigarage.com/javafx-book/.
- Vivien, Vladimir (August 25, 2010). JavaFX 1.2 Application Development Cookbook. Packt Publishing. p. 332. ISBN 978-1-84719-894-5. https://www.packtpub.com/javafx-1-2-application-development-cookbook/book.
- Jordan, Lucas (December 17, 2009). JavaFX Special Effects: Taking Java RIA to the Extreme with Animation, Multimedia, and Game Elements. Apress. p. 300. doi:10.1007/978-1-4302-2624-6. ISBN 978-1-4302-2623-9. https://link.springer.com/book/10.1007/978-1-4302-2624-6.
- Morris, Simon (November 23, 2009). JavaFX in Action. Manning. p. 375. ISBN 978-1-933988-99-3. http://www.jfxia.com/.
- Topley, Kim (October 12, 2009). JavaFX Developer's Guide. Addison-Wesley Professional. p. 640. ISBN 978-0-321-60165-0. http://www.informit.com/store/product.aspx?isbn=0321648978.
- Weaver, James L.; Gao, Weiqi; Chin, Stephen; Iverson, Dean (June 22, 2009). Pro JavaFX Platform: Script, Desktop and Mobile RIA with Java Technology. Apress. p. 500. ISBN 978-1-4302-1875-3. https://link.springer.com/book/9781430218753.
- Clarke, Jim; Connors, Jim; J. Bruno, Eric (June 15, 2009). JavaFX: Developing Rich Internet Applications. Prentice Hall. p. 384. ISBN 978-0-13-701287-9. http://www.informit.com/store/product.aspx?isbn=0137013531.
- Anderson, Gail; Anderson, Paul (June 15, 2009). Essential JavaFX. Prentice Hall. p. 360. ISBN 978-0-13-704279-1. http://www.informit.com/store/product.aspx?isbn=0137042795.
- Weaver, James L. (May 4, 2009). JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications. Apress. p. 200. ISBN 978-1-59059-945-7. https://dl.acm.org/doi/10.5555/1349814.
External links
Original source: https://en.wikipedia.org/wiki/JavaFX.
Read more |