SlideShare a Scribd company logo
Enterprising JavaFX
Richard & Jasper (and Tor!)
Sun Microsystems
www.devoxx.com
Overall presentation goal
Show that JavaFX can rock in the enterprise!
www.devoxx.com
Speaker’s qualifications
Core Engineers on JavaFX at Sun Microsystems
Jasper is the design wizard for FX and author of
the Charts API
Richard is API design lead for FX, UI Controls lead,
and key scenegraph developer
Both write lots of cool stuff
www.devoxx.com
Agenda
Web Services
Controls
Styling
Tooling
www.devoxx.com
Web Services
www.devoxx.com
Many Choices
HTTP
JSON
XML
JDBC
JAX-*
SOAP
REST
XML-RPC
www.devoxx.com
Threading
All data access should occur on background thread
JavaFX Script is currently single threaded
Never create JavaFX objects on a background thread!
Use the Task API
Subclass from JavaTaskBase
www.devoxx.com
Task
Create the task
Initialize callbacks
Bind to state you want to observe
Start it
www.devoxx.com
Read-onlyVariables
started
stopped
failed
succeeded
done
percentDone
www.devoxx.com
Events
onStart
onDone
www.devoxx.com
Functions
start
stop
www.devoxx.com
JavaTaskBase
Used for all custom Tasks
create():RunnableFuture*
www.devoxx.com
Writing a Custom Task
Step 1: Subclass from JavaTaskBase
Step 2: Create a Java implementation peer
Step 3: Callback from the peer to the task on
completion
Step 4: Create FX objects, do FX work on the FX
thread
Step 1: Subclass
public class LoginTask extends JavaTaskBase {
public-init var username:String;
public-init var password:String;
public-read var token:String;
}
Step 2: Create Peer
public class LoginTaskImpl implements RunnableFuture {
private JiraSoapService jira;
private String username;
private String password;
String token;
public LoginTaskImpl(JiraSoapService jira, String username, String password) {
this.jira = jira;
this.username = username;
this.password = password;
}
public void run() throws Exception {
token = jira.login(username, password);
}
}
Step 3: Callback
public class LoginTask extends JavaTaskBase, FinishedHandler {
...
var impl:LoginTaskImpl;
override protected function create():RunnableFuture {
impl = new LoginTaskImpl(jira, this, username, password)
}
}
Step 3: Callback
public class LoginTaskImpl implements RunnableFuture {
...
private FinishedHandler handler;
public LoginTaskImpl(JiraSoapService jira, FinishedHandler handler, String username,
String password) {
...
this.handler = handler;
}
public void run() throws Exception {
token = jira.login(username, password);
handler.backgroundWorkFinished();
}
}
Step 4: FX
public class LoginTask extends JavaTaskBase, FinishedHandler {
...
override public function backgroundWorkFinished():Void {
FX.deferAction(function():Void {
token = impl.token;
});
}
}
www.devoxx.com
DEMO
www.devoxx.com
Controls
www.devoxx.com
Our Goals
Simple
Useful
Rich
Control
Behavior
Skin
The Design
www.devoxx.com
Controls ::The Family
Button
ToggleButton
RadioButton
CheckBox
Slider
Label
Hyperlink
ProgressIndicator
ProgressBar
TextBox
ListView
TreeView*
PasswordBox*
ChoiceButton*
MenuButton*
SplitMenuButton*
Menus*
ToolBar*
ScrollBar*
ScrollView*
Multiline TextBox*
Horizontal ListView*
Popup*
Tooltip*
www.devoxx.com
Controls ::The Family
Button
ToggleButton
RadioButton
CheckBox
Slider
Label
Hyperlink
ProgressIndicator
ProgressBar
TextBox
ListView
TreeView*
PasswordBox*
ChoiceButton*
MenuButton*
SplitMenuButton*
Menus*
ToolBar*
ScrollBar*
ScrollView*
Multiline TextBox*
Horizontal ListView*
Popup*
Tooltip*
www.devoxx.com
Progress Indicator
Small circular progress indicator
Bind directly to task.percentDone
Example:
var task = CustomTask { ... }

ProgressIndicator { progress: bind task.percentDone }
www.devoxx.com
TextBox
Single or Multiline (single style) text input
Useful for building other controls
like a search box
Example:
var t:TextBox = TextBox {

promptText: “Search”

action: function() {

startSearch(t.text);

t.text = “”;

}

}
www.devoxx.com
ListView
Horizontal orVertical
Massively Scalable
Custom Cells
Dynamically variable row heights
Animated cells
Standard ListView
var list = ListView {
items: [“Apples”, “Oranges”, “Pears”]
}
Custom Cell
var list = ListView {
items: [“Apples”, “Oranges”, “Pears”]
cellFactory: function() {
ListCell {
node: ...
}
}
}
www.devoxx.com
Cell
Cell has 3 layers
Background
Node
Foreground
Specialize any of these 3 layers
ListCell,TreeCell,TableCell
www.devoxx.com
DEMO
www.devoxx.com
Styling
www.devoxx.com
Styling
Easy and Powerful (CSS)
Highly Customized (fxz)
Complete Control (code)
www.devoxx.com
Styling
Easy and Powerful (CSS)
Highly Customized (fxz)
Complete Control (code)
CSS
www.devoxx.com
CSS
CSS is our strategy for styling. If you use our UI
Controls, you use CSS.
Caspian is our default CSS stylesheet
CSS is fast, and works on mobile, desktop, and tv
Stick to the spirit of HTML CSS, but do not be
bound by it
www.devoxx.com
Regions
Break control skins in stylable parts
In some ways similar to HTML CSS’s Box but not
that same
Can be Rectangle with independently rounded
corners or any arbitrary path
Can have multiple background fills, background
images, border strokes and border images
Regions: Background Fills
Regions: Stroke Borders
Enterprising JavaFX
Regions: ScrollBar
ScrollBar RegionThumb RegionTrack RegionLeft Button Region Right Button Region
Left Arrow Region Right Arrow Region
www.devoxx.com
DEMO
www.devoxx.com
Tooling
www.devoxx.com
JavaFX Authoring Tool
Lead Engineer:Tor Norbye
Tool for creating JavaFX Content
Built completely on top of JavaFX and Controls
www.devoxx.com
DEMO
www.devoxx.com
Summary
JavaFX is serious about the enterprise
it is what we do
Many additional controls coming in next release
Extensive support for styling controls
www.devoxx.com
Thanks for your attention!
http://fxexperience.com
http://javafx.com

More Related Content

PPTX
Behat - Drupal South 2018
PPTX
Laravel - Website Development in Php Framework.
PPTX
Workshop Laravel 5.2
PPT
ASP.NET Session 9
PPT
ASP.NET Session 6
PDF
Laravel mail example how to send an email using markdown template in laravel 8
PDF
Getting Started with WP-CLI
PDF
JPQL/ JPA Activity 2
 
Behat - Drupal South 2018
Laravel - Website Development in Php Framework.
Workshop Laravel 5.2
ASP.NET Session 9
ASP.NET Session 6
Laravel mail example how to send an email using markdown template in laravel 8
Getting Started with WP-CLI
JPQL/ JPA Activity 2
 

What's hot (20)

PPT
ASP.NET Session 5
PPTX
Green Lantern Framework with Selenium IDE
PDF
Best Laravel Eloquent Tips and Tricks
PPTX
#42 green lantern framework
PDF
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless Way
PDF
Creating a comp
PPTX
Ajax control tool kit
PDF
Ruby On Rails Starter Kit
PPTX
Mule with salesforce push topic notification copy
PDF
Droidcon ES '16 - How to fail going offline
PPTX
BDD, Behat & Drupal
PDF
Introductontoxaml
PPT
ASP.NET Session 10
PDF
Top 7 Angular Best Practices to Organize Your Angular App
PDF
Automation Anywhere Examples
PDF
Build a game with javascript (may 21 atlanta)
PPTX
Mule using Salesforce
PDF
Creating messages
PDF
watir-webdriver
ASP.NET Session 5
Green Lantern Framework with Selenium IDE
Best Laravel Eloquent Tips and Tricks
#42 green lantern framework
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless Way
Creating a comp
Ajax control tool kit
Ruby On Rails Starter Kit
Mule with salesforce push topic notification copy
Droidcon ES '16 - How to fail going offline
BDD, Behat & Drupal
Introductontoxaml
ASP.NET Session 10
Top 7 Angular Best Practices to Organize Your Angular App
Automation Anywhere Examples
Build a game with javascript (may 21 atlanta)
Mule using Salesforce
Creating messages
watir-webdriver
Ad

Viewers also liked (17)

PPTX
PPTX
Презентація Корнинської ОТГ Житомирської області
PPTX
Home electronics trade show
PDF
From Shabby to Chic
PDF
sundarban soil carbon
PPTX
Презентація Попільнянської ОТГ Житомирської області
PPTX
IDEAS psychiatry
DOCX
Rpp pertidaksamaan rasional dan irasional kurikulum 2013
PPTX
Презентація Іршанської ОТГ Житомирської області
PDF
Acidification of Sundarban water
PDF
PDF
Curso de teclado (COMPLETO) - Aprenda a Tocar Teclado
PDF
Role of customer executive in an it company
PPTX
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
PPT
Основні поняття та засоби комп'ютерної графіки
PPTX
Результаты деятельности МБДОУ "Детский сад №260"
PPTX
Vacation tour packages panama
Презентація Корнинської ОТГ Житомирської області
Home electronics trade show
From Shabby to Chic
sundarban soil carbon
Презентація Попільнянської ОТГ Житомирської області
IDEAS psychiatry
Rpp pertidaksamaan rasional dan irasional kurikulum 2013
Презентація Іршанської ОТГ Житомирської області
Acidification of Sundarban water
Curso de teclado (COMPLETO) - Aprenda a Tocar Teclado
Role of customer executive in an it company
GERENCIA Y ADMINISTRACION DE SALUD, SISTEMA DE SALUD DE LOS ESTADOS UNIDOS.
Основні поняття та засоби комп'ютерної графіки
Результаты деятельности МБДОУ "Детский сад №260"
Vacation tour packages panama
Ad

Similar to Enterprising JavaFX (20)

PDF
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
PDF
JavaFX for Java Developers
PDF
MobX: the way to simplicity
PDF
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
PDF
Lublin Startup Festival - Mobile Architecture Design Patterns
PDF
Developex_presentation_v2
PPTX
Getting started with Xamarin forms
PPT
Introduction To Rich Internet Applications
PDF
JavaFX Deployment
PPTX
A Beard, An App, A Blender
PDF
JavaFX Enterprise (JavaOne 2014)
PPT
Jvm mbeans jmxtran
PDF
Dojo CRUD Components
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
PDF
MvvmCross Seminar
PDF
MvvmCross Introduction
PDF
PPTX
Hacking the Explored App by Adding Custom Code (UI5con 2016)
PDF
AJAX\'s Impact on Telecom
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
JavaFX for Java Developers
MobX: the way to simplicity
Download full ebook of Flex on Java Bernerd Allmon instant download pdf
Lublin Startup Festival - Mobile Architecture Design Patterns
Developex_presentation_v2
Getting started with Xamarin forms
Introduction To Rich Internet Applications
JavaFX Deployment
A Beard, An App, A Blender
JavaFX Enterprise (JavaOne 2014)
Jvm mbeans jmxtran
Dojo CRUD Components
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
MvvmCross Seminar
MvvmCross Introduction
Hacking the Explored App by Adding Custom Code (UI5con 2016)
AJAX\'s Impact on Telecom
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty

More from Richard Bair (6)

PDF
Building Amazing Applications with JavaFX
PDF
Practical Experience Building JavaFX Rich Clients
PDF
Java Rich Clients with JavaFX 2.0
PDF
JavaFX 101
PDF
Gaming JavaFX
PDF
JavaFX In Practice
Building Amazing Applications with JavaFX
Practical Experience Building JavaFX Rich Clients
Java Rich Clients with JavaFX 2.0
JavaFX 101
Gaming JavaFX
JavaFX In Practice

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
Encapsulation_ Review paper, used for researhc scholars
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
Building Integrated photovoltaic BIPV_UPV.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Programs and apps: productivity, graphics, security and other tools
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity

Enterprising JavaFX