SlideShare a Scribd company logo
1 of 45
Download to read offline
JavaFX
 Paul Bakker
About me
Paul Bakker
                        EJB 3
 Trainer Info Support
                        JSF
 NLJUG speaker          Seam
 Java Magazine author   JavaFX
                        Spring
                        Hibernate
                        Flex
Outline
Video
Deployment
Mobile
Production Suite
Web Services API
One minute intro
JavaFX is Sun’s RIA platform
  Competes with Flex, Flash and Silverlight
A new language
  JavaFX Script
  Declarative UI programming
Platform Support
         MacOS
         Windows
         Linux / Solaris on the way
Runtimes
JRE 6 update 11 recommended
   Performance
   Drag-able applets
   Stability
   Download size
Runs on JRE 5
Video

  Native codec support
  Cross platform FLV
Native codecs
                      Core Video
Video: H.261, H.263, and H.264 codecs
MPEG-1, MPEG-2, and MPEG-4 Video file formats and
associated codecs (such as AVC)
Sorenson Video 2 and 3 codecs

  Audio: AIFF, MP3, WAV,MPEG-4 AAC Audio
(.m4a, .m4b, .m4p), MIDI
Native Codecs
               DirectShow

Video: Windows Media Video,H264 (as an
update)
Audio: MPEG-1, MP3, Windows Media Audio,
MIDI
FXM
Video: On2 VP6
Audio: MP3
Using Video

Media
   MediaPlayer
      MediaView
Media
var
media
=
Media
{



source:
quot;file:///Users/paul/21.aviquot;
}



 MediaPlayer
 var
player
=
MediaPlayer
{
 



media:
media
 



autoPlay:true
 }
MediaView
Stage
{




title:
quot;Video
demoquot;




width:
bind
media.width




height:
bind
media.height




scene:
Scene
{








content:
MediaView
{












mediaPlayer:
player








}




}
}
Media
        SimpleVideo
        VideoPerformance
Skins
Styling components
using external

                             CSS
style sheets
Skins
Styling components
using external

                              CSS
style sheets




Not a standard feature yet!
A skinnable button

public
class
Button
extends
Control{




public
var
label
:
String;














init
{








skin
=
ButtonSkin{}




}
}
The Skin
public
class
ButtonSkin
extends
Skin{




public
var
backgroundColor
:
Color
=
Color.BLACK;




public
var
color
:
Color
=
Color.WHITE;




public
var
arcHeight
:
Number
=
20;




public
var
arcWidth
:
Number
=
20;





var
button
:
Button
=
bind
control
as
Button;






init
{








scene
=
{
















....
//
Draw
the
control’s
UI
The CSS
Button
{




backgroundColor:
green;




color:
black;




arcHeight:
0;




arcWidth:
0;
}

Button.rounded
{




arcHeight:
20;




arcWidth:
20;
}
Deployment
Desktop, Browser and Mobile
No code changes
Device specific hooks
One
root object
              Stage
{
              



title:
quot;Application
titlequot;
              



width:
250
              



height:
80
              



scene:
Scene
{
              







content:
[]
              





              



}
              }
Applet
<script
src=quot;http://dl.javafx.com/dtfx.jsquot;></script>
<script>




javafx(








{














archive:
quot;JavaFXDemo.jarquot;,














draggable:
true,














width:
800,














height:
600,














code:
quot;awsdemo.AmazonBrowserquot;,














name:
quot;JavaFXDemoquot;








}




);
</script>
Applet hooks

Specify drag behavior
extensions:
[








AppletStageExtension
{












onDragStarted:
function()
{





























}








}




]
JavaScript integration
    Call JavaScript from Java


var
applet
=
FX.getArgument(quot;javafx.appletquot;)
as

java.applet.Applet;

var
window
:
JSObject
=
JSObject.getWindow(applet);

window.call(quot;showProductquot;,

  [product.name,
product.description]);
<script>
function showProduct(name, description) {
   var titleElement = document.getElementById('productTitle');
   titleElement.innerHTML = name;

   var detailsElement =
document.getElementById('productDetails');
   detailsElement.innerHTML = description;

}
</script>

<h1 id=quot;productTitlequot;></h1>
<div id=quot;productDetailsquot;></div>
Frame styles

Decorated (standard)
Undecorated
Transparent
Applets
          WindowStyles
          JavaScriptDemo
Animation
 Timeline
  Set of frames
  Controls playing


 KeyFrame
  A moment in time
Defining KeyFrames
KeyFrame {
 time: 1s
 values: [
    imageView.x => 100 tween Interpolator.EASEBOTH
    imageView.y => 100 tween Interpolator.EASEBOTH
  ]

 action: function() {
   println(“Action executed”);
 }
}
Transitions
Predefined animations
   FadeTransition
   ParallelTransition
   PathTransition
   PauseTransition
   RotateTransition
   ScaleTransition
Animation
Mobile
  February 2009




Write Once, Run
 Everywhere
Not supported

Effects (reflection etc.)
Opacity
Video
Mobile
Production Suite
Designer => Developer
    Workflow
Web Services

HTTPRequest
    REST style services
PullParser
    JSON & XML
Web Service call

Enqueue HTTP Request
Handle input
Parse input
    Handle ‘events’
XML PullParser
if(event.qname.name
==
quot;Itemquot;
and
event.type
==



PullParser.START_ELEMENT)
{



product
=
new
Product();
}

else
if(event.qname.name
==
quot;Titlequot;)
{



product.title
=
event.text;
}

else
if(event.qname.name
==
quot;Itemquot;
and
event.type
==

PullParser.END_ELEMENT)
{



insert
product
into
products;
}

Web Services
               Amazon Demo
Effects

Effect property at any Node
  Including text, video, and images
Lots of standard effects
  e.g. DropShadow, Blur, InnerShadow,
  Reflection, SepiaTone
Current problems
No components!
No layout managers
No selectable text
Road Map
Februari 2009 => JavaFX Mobile 1.0
JavaOne 2009 => Announcing JavaFX 2.0
Winter 2009 => JavaFX 2.0
   Complete new component suite
   Swing end-of-life?
JavaFX.com
The RIA war
Shameless plug ;-)
2 day JavaFX course now available
  Full JavaFX Script language coverage
  Video
  Web Services
  Animations
  Custom components
  Production Suite

More Related Content

What's hot

Step By Step Guide For Buidling Simple Struts App
Step By Step Guide For Buidling Simple Struts AppStep By Step Guide For Buidling Simple Struts App
Step By Step Guide For Buidling Simple Struts App
Syed Shahul
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
Igor Bronovskyy
 

What's hot (20)

The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Vaadin Components
Vaadin ComponentsVaadin Components
Vaadin Components
 
Vaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 editionVaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 edition
 
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and MavenWebtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
Webtests Reloaded - Webtest with Selenium, TestNG, Groovy and Maven
 
Java fx smart code econ
Java fx smart code econJava fx smart code econ
Java fx smart code econ
 
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017
 
Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2Real use cases of performance optimization in magento 2
Real use cases of performance optimization in magento 2
 
Vaadin & Web Components
Vaadin & Web ComponentsVaadin & Web Components
Vaadin & Web Components
 
Desenvolvendo uma aplicação híbrida para Android e IOs utilizando Ionic, aces...
Desenvolvendo uma aplicação híbrida para Android e IOs utilizando Ionic, aces...Desenvolvendo uma aplicação híbrida para Android e IOs utilizando Ionic, aces...
Desenvolvendo uma aplicação híbrida para Android e IOs utilizando Ionic, aces...
 
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKKey Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
 
Night Watch with QA
Night Watch with QANight Watch with QA
Night Watch with QA
 
Flutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdfFlutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdf
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
 
Step By Step Guide For Buidling Simple Struts App
Step By Step Guide For Buidling Simple Struts AppStep By Step Guide For Buidling Simple Struts App
Step By Step Guide For Buidling Simple Struts App
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Go swagger tutorial how to create golang api documentation using go swagger (1)
Go swagger tutorial how to create golang api documentation using go swagger (1)Go swagger tutorial how to create golang api documentation using go swagger (1)
Go swagger tutorial how to create golang api documentation using go swagger (1)
 
Jsfandsecurity
JsfandsecurityJsfandsecurity
Jsfandsecurity
 

Viewers also liked

Designing a JavaFX Mobile application
Designing a JavaFX Mobile applicationDesigning a JavaFX Mobile application
Designing a JavaFX Mobile application
Fabrizio Giudici
 

Viewers also liked (20)

Designing a JavaFX Mobile application
Designing a JavaFX Mobile applicationDesigning a JavaFX Mobile application
Designing a JavaFX Mobile application
 
JavaFX and HTML5 - Like Curds and Rice
JavaFX and HTML5 - Like Curds and RiceJavaFX and HTML5 - Like Curds and Rice
JavaFX and HTML5 - Like Curds and Rice
 
Building RIA Applications with JavaFX
Building RIA Applications with JavaFXBuilding RIA Applications with JavaFX
Building RIA Applications with JavaFX
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
 
JavaFX technology
JavaFX technologyJavaFX technology
JavaFX technology
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative Languages
 
JavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaJavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской Java
 
JavaFX 2.0 overview
JavaFX 2.0 overviewJavaFX 2.0 overview
JavaFX 2.0 overview
 
01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFX01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFX
 
JavaFX introduction
JavaFX introductionJavaFX introduction
JavaFX introduction
 
Introduction to JavaFX 2
Introduction to JavaFX 2Introduction to JavaFX 2
Introduction to JavaFX 2
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFX
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
8 True Stories about JavaFX
8 True Stories about JavaFX8 True Stories about JavaFX
8 True Stories about JavaFX
 
Mini-curso JavaFX Aula1
Mini-curso JavaFX Aula1Mini-curso JavaFX Aula1
Mini-curso JavaFX Aula1
 
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
JavaFX 2 and Scala - Like Milk and Cookies (33rd Degrees)
 
JavaFX for Java Developers
JavaFX for Java DevelopersJavaFX for Java Developers
JavaFX for Java Developers
 
Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFX
 

Similar to JavaFX Advanced

Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
rajivmordani
 
Performance Improvements In Browsers
Performance Improvements In BrowsersPerformance Improvements In Browsers
Performance Improvements In Browsers
GoogleTecTalks
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
oscon2007
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
Fabien Potencier
 

Similar to JavaFX Advanced (20)

Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
Performance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScriptPerformance, Games, and Distributed Testing in JavaScript
Performance, Games, and Distributed Testing in JavaScript
 
Performance Improvements In Browsers
Performance Improvements In BrowsersPerformance Improvements In Browsers
Performance Improvements In Browsers
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
 
Java/Swing
Java/SwingJava/Swing
Java/Swing
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
The Future of Firefox and JavaScript
The Future of Firefox and JavaScriptThe Future of Firefox and JavaScript
The Future of Firefox and JavaScript
 
Yakov Fain - Design Patterns a Deep Dive
Yakov Fain - Design Patterns a Deep DiveYakov Fain - Design Patterns a Deep Dive
Yakov Fain - Design Patterns a Deep Dive
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
Skype Development Techniques and Tools
Skype Development Techniques and ToolsSkype Development Techniques and Tools
Skype Development Techniques and Tools
 
Developing for Plone using ArchGenXML / ArgoUML
Developing for Plone using ArchGenXML / ArgoUMLDeveloping for Plone using ArchGenXML / ArgoUML
Developing for Plone using ArchGenXML / ArgoUML
 
Alfresco sdk 2.0
Alfresco sdk 2.0Alfresco sdk 2.0
Alfresco sdk 2.0
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
 
Api Design
Api DesignApi Design
Api Design
 
The Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove OnThe Tantric Team: Getting Your Automated Build Groove On
The Tantric Team: Getting Your Automated Build Groove On
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Google Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and BeyondGoogle Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and Beyond
 
Hacking Movable Type Training - Day 1
Hacking Movable Type Training - Day 1Hacking Movable Type Training - Day 1
Hacking Movable Type Training - Day 1
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overview
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

JavaFX Advanced