What is JavaFX ?
JavaFX is a set of graphics and media packages that enables developers to design, create, test, debug, and deploy rich client applications that operate consistently across diverse platforms.
-
JavaFX Applications
-
Availability
-
Key Features
-
What Can I Build with JavaFX?
-
How Do I Run a Sample Application?
-
How Do I Run a Sample in an IDE?
-
How Do I Create a JavaFX Application?
-
Resources
JavaFX Applications
Since the JavaFX library is written as a Java API, JavaFX application code can reference APIs from any Java library. For example, JavaFX applications can use Java API libraries to access native system capabilities and connect to server-based middleware applications.The look and feel of JavaFX applications can be customized. Cascading Style Sheets (CSS) separate appearance and style from implementation so that developers can concentrate on coding. Graphic designers can easily customize the appearance and style of the application through the CSS. If you have a web design background, or if you would like to separate the user interface (UI) and the back-end logic, then you can develop the presentation aspects of the UI in the FXML scripting language and use Java code for the application logic. If you prefer to design UIs without writing code, then use JavaFX Scene Builder. As you design the UI, Scene Builder creates FXML markup that can be ported to an Integrated Development Environment (IDE) so that developers can add the business logic.
Availability
The JavaFX APIs are available as a fully integrated feature of the Java SE Runtime Environment (JRE) and the Java Development Kit (JDK ). Because the JDK is available for all major desktop platforms (Windows, Mac OS X, and Linux), JavaFX applications compiled to JDK 7 and later also run on all the major desktop platforms. Support for ARM platforms has also been made available with JavaFX 8. JDK for ARM includes the base, graphics and controls components of JavaFX.The cross-platform compatibility enables a consistent runtime experience for JavaFX applications developers and users. Oracle ensures synchronized releases and updates on all platforms and offers an extensive support program for companies that run mission-critical applications.
On the JDK download page, you can get a zip file of JavaFX sample applications. The sample applications provide many code samples and snippets that show by example how to write JavaFX applications. See "How Do I Run a Sample Application?" for more information.
Key Features
The following features are included in JavaFX 8 and later releases. Items that were introduced in JavaFX 8 release are indicated accordingly:-
Java APIs. JavaFX is a Java library that
consists of classes and interfaces that are written in Java code. The
APIs are designed to be a friendly alternative to Java Virtual Machine
(Java VM) languages, such as JRuby and Scala.
-
FXML and Scene Builder. FXML is an
XML-based declarative markup language for constructing a JavaFX
application user interface. A designer can code in FXML or use JavaFX
Scene Builder to interactively design the graphical user interface
(GUI). Scene Builder generates FXML markup that can be ported to an IDE
where a developer can add the business logic.
-
WebView. A web component that uses
WebKitHTML technology to make it possible to embed web pages within a
JavaFX application. JavaScript running in WebView can call Java APIs,
and Java APIs can call JavaScript running in WebView. Support for
additional HTML5 features, including Web Sockets, Web Workers, and Web
Fonts, and printing capabilities have been added in JavaFX 8. See Adding HTML Content to JavaFX Applications.
-
Swing interoperability. Existing Swing
applications can be updated with JavaFX features, such as rich graphics
media playback and embedded Web content. The
SwingNode
class, which enables you to embed Swing content into JavaFX applications, has been added in JavaFX 8. See the SwingNode API javadoc and Embedding Swing Content in JavaFX Applications for more information.
-
Built-in UI controls and CSS.
JavaFX provides all the major UI controls that are required to develop a
full-featured application. Components can be skinned with standard Web
technologies such as CSS. The DatePicker and TreeTableView UI controls
are now available with the JavaFX 8 release. See Using JavaFX UI Controls for more information. Also, the CSS Styleable* classes have become public API, allowing objects to be styled by CSS.
-
Modena theme.
The Modena theme replaces the Caspian theme as the default for JavaFX 8
applications. The Caspian theme is still available for your use by
adding the
setUserAgentStylesheet(STYLESHEET_CASPIAN)
line in your Application start() method. For more information, see the Modena blog at fxexperience.com
-
3D Graphics Features. The new API classes for
Shape3D
(Box, Cylinder, MeshView, and Sphere
subclasses),SubScene, Material, PickResult, LightBase (AmbientLight
andPointLight
subclasses), andSceneAntialiasing
have been added to the 3D Graphics library in JavaFX 8. TheCamera
API class has also been updated in this release. For more information, see the Getting Started with JavaFX 3D Graphics document and the corresponding API javadoc forjavafx.scene.shape.Shape3D
,javafx.scene.SubScene, javafx.scene.paint.Material, javafx.scene.input.PickResult
, andjavafx.scene.SceneAntialiasing
.
-
Canvas API. The Canvas API enables drawing directly within an area of the JavaFX scene that consists of one graphical element (node).
-
Printing API. The
javafx.print
package has been added in Java SE 8 release and provides the public classes for the JavaFX Printing API.
-
Rich Text Support. JavaFX 8 brings enhanced
text support to JavaFX, including bi-directional text and complex text
scripts, such as Thai and Hindu in controls, and multi-line, multi-style
text in text nodes.
-
Multitouch Support. JavaFX provides support for multitouch operations, based on the capabilities of the underlying platform.
-
Hi-DPI support. JavaFX 8 now supports Hi-DPI displays.
-
Hardware-accelerated graphics pipeline.
JavaFX graphics are based on the graphics rendering pipeline (Prism).
JavaFX offers smooth graphics that render quickly through Prism when it
is used with a supported graphics card or graphics processing unit
(GPU). If a system does not feature one of the recommended GPUs
supported by JavaFX, then Prism defaults to the software rendering
stack.
-
High-performance media engine. The media
pipeline supports the playback of web multimedia content. It provides a
stable, low-latency media framework that is based on the GStreamer
multimedia framework.
-
Self-contained application deployment model.
Self-contained application packages have all of the application
resources and a private copy of the Java and JavaFX runtimes. They are
distributed as native installable packages and provide the same
installation and launch experience as native applications for that
operating system.
No comments:
Post a Comment