SlideShare a Scribd company logo
1 of 45
JavaFX™ 1.0
    SDK
About the Speakers
•   Martin lead the team
    responsible for the JavaFX
    Production Suite

•   Richard is one of the API
    leads for JavaFX SDK

•   Jasper is one of the key
    engineers on the JavaFX
    SDK
JavaFX is for graphical Java applications
           across all devices.
Agenda

•   Introduction to JavaFX

•   (Brief) JavaFX Script

•   Scene Graph

•   Animations and
    Transitions

•   Q &A
Introduction to JavaFX™
•   Common APIs across
    devices

•   Scales from small devices
    to powerful desktops

•   Brings rich media and
    graphical APIs to Java

•   Simplifies building
    graphical consumer and
    enterprise applications
JavaFX Script
•   Expression language

•   Declarative and
    Procedural

•   Integrates with Java

•   Loosely based on
    JavaScript
JavaFX Script Explained
•   JavaFX Script source files
    are called “scripts”

•   Everything* in JavaFX
    Script is an expression

    •   All blocks are
        expressions

    •   The last line is the
        result
Primitive Data Types
•   Boolean

•   Integer

•   Number

•   String

•   Duration

•   Primitives cannot be null*
Declaring Sequences
// A sequence of one can omit the brackets
var names:String[] = “Richard”;

// Empty sequences are not null
var names:String[];
println(sizeof names); // prints 0

// elements are accessed by index
var names = [“Jasper”, “Richard”, “Martin”];
var martin = names[2];

// and you can populate a sequence using a for loop
var hellos = for (i in [1..3]) { “Hello #{i}” }
Modifying Sequences
// Inserting items into a sequence
var names:String[] = “Richard”;
insert “Jasper” into names;

// Inserting before a certain index
insert “Martin” before names[1];

// Inserting after a certain index
insert “Duke” after names[1];

// Deleting from the sequence
delete “Duke” from names;
Operators
•   +-/*

•   ++ --

•   *= /= += -=

•   and or not

•   = == !=

•   mod
Flow Control
•   if ( booleanExpression)     •   for (i in sequence) { ... }
    then a else b
                                    •   Can get index of item
•   if (booleanExpression) a            “i” by “indexof i”
    else b
                                • break
•   if (booleanExpression)
    { a } else { b }            • continue
•   while (booleanExpression)
    { ... }
Bind
• bind is a way to tie the       •   bound variables cannot be
    value of one variable to         set manually
    the value of an expression

•   binding must be defined
    when the variable is
    initialized

•   bindings are statically
    compiled
JavaFX Objects
public class Distance extends {
  public var x1:Number;
  public var x2:Number;
  // Whenever x2 or x1 changes, distance will be updated
  // Binding can be used for invariants
  public-read var distance:Number = bind x2 - x1;
}
Object Literals
•   Concise declarative syntax
    for object creation

•   Similar to JavaScript

•   Combine with binding for
    maximum effect

•   variable: initial-value

    •   initial-value is an
        expression
Object Literal
// creates a Rectangle
// x: 10 is not an assignment, it is an initialization!
var rect = Rectangle {
   x: 10
   y: 10
   width: 100
   height: 100
}
Nested Literals
// creates a Rectangle with a Color for its fill
var rect = Rectangle {
   x: 10
   y: 10
   width: 100
   height: 100
   fill: Color {
      red: 1
      green: 0
      blue: 0
   }
}
Variables and Literals
// A variation that allows me to reference the color later
var color:Color;
var rect = Rectangle {
   x: 10
   y: 10
   width: 100
   height: 100
   fill: color = Color {
      red: 1
      green: 0
      blue: 0
   }
}
Scene Graph
•   Describes the graphics    •   Graph is set on a Scene
    and controls in a scene
                              •   Scene is set in a Stage
•   Each node in the graph
    has a single parent

•   Special “group” nodes
    have zero or more
    children

•   “leaf” nodes have no
    children
Scene Graph

                  Group




         Circle             Group




                     Line           Rect
Scene
•   Canvas upon which the
    Scene Graph is
    displayed

•   Can set multiple CSS
    Stylesheets

•   Can set background
    color (or set to null)

•   Can set canvas width /
    height
Stage
•   Top-level container for   •   JFrame on desktop
    the scene
                              •   JApplet on web page
•   Contains only one
    Scene                     •   SVG player on
                                  mobile
•   Can set Stage width /
    height

•   Potentially represented
    by:
Custom Node
•   Primary method of
    Scene Graph
    encapsulation

•   All other nodes are not
    extendable

•   Simply override the
    create() method
Shapes - Building Blocks
 •   Arc       •   Rectangle

 •   Circle    •   stroke

 •   Ellipse   •   strokeWidth

 •   Line      •   fill

 •   Path      •   smooth

 •   Polygon
Create an App
   (part 1)
Colors
•   Colors                     •   Color.rgb(128, 222,
                                   21)
    •   150+ built in colors
        (all the HTML & CSS
        built in values)

    •   Color.web(“#aabbcc
        ”)

    •   Color.web(“blue”)
Linear Gradients
•   startX, startY, endX,     •   Has an offset
    endY                          between 0...1

    •   Define the direction   •   Has a Color
        of the gradient

    •   On the unit square

•   Stops define each step
    in the gradient. Each
    stop
Create an App
   (part 2)
Images
•   ImageView node shows     •   Preserve ratio
    images
                             •   Fit within a specific
•   Image represents an in       width/height
    memory Image
                             •   When fit on Image
•   Image can load images        level, keeps smaller
    in FG thread or BG           image in memory
    thread

•   Both ImageView and
    Image can scale
Create an App
   (part 3)
Text
•   x, y, TextOrigin             •   Supports multiline text

•   By default, text             •   Use alignment to align
    positioned such that             multiline text
    (x, y) is left baseline
                                 •   To center text,
•   Fonts can be specified            compute the center via
    on Text                          layout bounds

•   Favor “fill” over
    “stroke”
Text Box
•   Used for text input      •   “action” function is
                                 invoked when ENTER
•   Use CSS to style the         pressed
    TextBox
                             •   “columns” specifies the
•   “text” is changed to         preferred width based
                                 on the font size and
    reflect the actual text
    in the TextBox               number of characters
                                 to display
•   “value” is changed
    when the text is
    “committed” via
    ENTER, TAB, etc
Effects
•   Effects are placed on        •   Reflection
    Nodes
                                 •   more...
•   Many standard built in

    •   DropShadow

    •   ColorAdjust

    •   GaussianBlur

    •   Glow
Create an App
   (part 4)
Media
•   JavaFX supports both visual     •   MediaView is the Node which
    and audio media                     displays the Media

•   Cross platform JavaFX Media     •   No built in Movie playing
    file (fxm, mp3)                      Control

•   Also plays native formats
    (mov, wmv)

•   Media class represents a
    media file

•   MediaPlayer plays a Media file
Animation
•   Animation is a key      •   Transitions
    feature of every rich
    graphics application
    platform

•   There are two
    supported animation
    types in JavaFX

    •   Keyframe
        Animations
Keyframe Animation
•   A general purpose        •   tween keyword and
    animation mechanism          custom interpolators
    for JavaFX
                             •   Long sytax vs short
•   Uses a concept of a          syntax
    timeline and keyframes
    specifying values at
    given times
                             •   autorepeat +
                                 autoreverse behavior

•   Built in the language    •   Actions
    syntax - can animate
    any variable             •   Nested timelines
Transitions
•   “Precanned”, single      •   Parallel
    purpose animations
                             •   Sequential
•   Translation/Rotation/
    Scale/Fade               •   Pause Transition

•   “by” values

•   Animation along a path   •
•   Containers:
Create an App
   (part 5)
JavaFX provides APIs for
    building creative
      applications
JavaFX will be updtaed
 regularly and quickly
1.1 release Februrary 2009
   1.5 release June 2009
JavaFX 1.0 Production Suite
 for professional graphics
Try JavaFX Today!
javafx.com

More Related Content

Viewers also liked

Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security Black Duck by Synopsys
 
Performing an audit - Open source compliance seminar
Performing an audit - Open source compliance seminar Performing an audit - Open source compliance seminar
Performing an audit - Open source compliance seminar Rogue Wave Software
 
Facebook vs instagram - Fellipe Guimarães - Instaby
Facebook vs instagram - Fellipe Guimarães - InstabyFacebook vs instagram - Fellipe Guimarães - Instaby
Facebook vs instagram - Fellipe Guimarães - InstabyFellipe Guimarães
 
MPC Capability Brochure_V6_2016_Digital
MPC Capability Brochure_V6_2016_DigitalMPC Capability Brochure_V6_2016_Digital
MPC Capability Brochure_V6_2016_DigitalDave Machin
 
Amazon by alex
Amazon by alexAmazon by alex
Amazon by alexAlex Mang
 
Disney Karl Marco
Disney Karl MarcoDisney Karl Marco
Disney Karl MarcoKarl Marco
 
Snapchat Company Presentation
Snapchat Company PresentationSnapchat Company Presentation
Snapchat Company PresentationJonathan Brelje
 

Viewers also liked (11)

Social goes visual
Social goes visual Social goes visual
Social goes visual
 
Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security Myths and Misperceptions of Open Source Security
Myths and Misperceptions of Open Source Security
 
Performing an audit - Open source compliance seminar
Performing an audit - Open source compliance seminar Performing an audit - Open source compliance seminar
Performing an audit - Open source compliance seminar
 
Facebook vs instagram - Fellipe Guimarães - Instaby
Facebook vs instagram - Fellipe Guimarães - InstabyFacebook vs instagram - Fellipe Guimarães - Instaby
Facebook vs instagram - Fellipe Guimarães - Instaby
 
MPC Capability Brochure_V6_2016_Digital
MPC Capability Brochure_V6_2016_DigitalMPC Capability Brochure_V6_2016_Digital
MPC Capability Brochure_V6_2016_Digital
 
Pay Pal
Pay PalPay Pal
Pay Pal
 
Amazon by alex
Amazon by alexAmazon by alex
Amazon by alex
 
Nvidia
NvidiaNvidia
Nvidia
 
SpaceX
SpaceX  SpaceX
SpaceX
 
Disney Karl Marco
Disney Karl MarcoDisney Karl Marco
Disney Karl Marco
 
Snapchat Company Presentation
Snapchat Company PresentationSnapchat Company Presentation
Snapchat Company Presentation
 

Similar to JavaFX 1.0 SDK Aquarium Paris

DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007Eugene Lazutkin
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Languagejeresig
 
Android Bootcamp
Android   BootcampAndroid   Bootcamp
Android Bootcampahkjsdcsadc
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1rajivmordani
 
Towards a Framework for the Composition & Performance of Real-Time Notation
Towards a Framework for the Composition & Performance of Real-Time NotationTowards a Framework for the Composition & Performance of Real-Time Notation
Towards a Framework for the Composition & Performance of Real-Time Notationchrismcclelland
 
javascript teach
javascript teachjavascript teach
javascript teachguest3732fa
 
JSBootcamp_White
JSBootcamp_WhiteJSBootcamp_White
JSBootcamp_Whiteguest3732fa
 
ArchGenXML / UML and Plone
ArchGenXML / UML and PloneArchGenXML / UML and Plone
ArchGenXML / UML and PloneJazkarta, Inc.
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyGuillaume Laforge
 
iOS Visual F/X Using GLSL
iOS Visual F/X Using GLSLiOS Visual F/X Using GLSL
iOS Visual F/X Using GLSLDouglass Turner
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.jsjeresig
 

Similar to JavaFX 1.0 SDK Aquarium Paris (20)

DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Language
 
Android Bootcamp
Android   BootcampAndroid   Bootcamp
Android Bootcamp
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
Practical Groovy DSL
Practical Groovy DSLPractical Groovy DSL
Practical Groovy DSL
 
Better code in JavaScript
Better code in JavaScriptBetter code in JavaScript
Better code in JavaScript
 
Towards a Framework for the Composition & Performance of Real-Time Notation
Towards a Framework for the Composition & Performance of Real-Time NotationTowards a Framework for the Composition & Performance of Real-Time Notation
Towards a Framework for the Composition & Performance of Real-Time Notation
 
Chapter-3.pdf
Chapter-3.pdfChapter-3.pdf
Chapter-3.pdf
 
javascript teach
javascript teachjavascript teach
javascript teach
 
JSBootcamp_White
JSBootcamp_WhiteJSBootcamp_White
JSBootcamp_White
 
Ndp Slides
Ndp SlidesNdp Slides
Ndp Slides
 
pastel
pastelpastel
pastel
 
pastel
pastelpastel
pastel
 
ArchGenXML / UML and Plone
ArchGenXML / UML and PloneArchGenXML / UML and Plone
ArchGenXML / UML and Plone
 
Silverlight
SilverlightSilverlight
Silverlight
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in Groovy
 
iOS Visual F/X Using GLSL
iOS Visual F/X Using GLSLiOS Visual F/X Using GLSL
iOS Visual F/X Using GLSL
 
JavaFX Advanced
JavaFX AdvancedJavaFX Advanced
JavaFX Advanced
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
 

More from Alexis Moussine-Pouchkine

GlassFish OSGi - From modular runtime to hybrid applications
GlassFish OSGi - From modular runtime to hybrid applicationsGlassFish OSGi - From modular runtime to hybrid applications
GlassFish OSGi - From modular runtime to hybrid applicationsAlexis Moussine-Pouchkine
 

More from Alexis Moussine-Pouchkine (20)

GlassFish Article September 07
GlassFish Article September 07GlassFish Article September 07
GlassFish Article September 07
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 
GlassFish Community and future larochelle
GlassFish Community and future larochelleGlassFish Community and future larochelle
GlassFish Community and future larochelle
 
Javaee glassfish jcertif2010
Javaee glassfish jcertif2010Javaee glassfish jcertif2010
Javaee glassfish jcertif2010
 
GlassFish Community - FISL 2010
GlassFish Community - FISL 2010GlassFish Community - FISL 2010
GlassFish Community - FISL 2010
 
GlassFish OSGi - From modular runtime to hybrid applications
GlassFish OSGi - From modular runtime to hybrid applicationsGlassFish OSGi - From modular runtime to hybrid applications
GlassFish OSGi - From modular runtime to hybrid applications
 
Feuille de route (roadmap) GlassFish
Feuille de route (roadmap) GlassFishFeuille de route (roadmap) GlassFish
Feuille de route (roadmap) GlassFish
 
Java EE 6 Solutions Linux 2010
Java EE 6 Solutions Linux 2010Java EE 6 Solutions Linux 2010
Java EE 6 Solutions Linux 2010
 
GlassFish v3 at JavaZone 09
GlassFish v3 at JavaZone 09GlassFish v3 at JavaZone 09
GlassFish v3 at JavaZone 09
 
L'association GUSES
L'association GUSESL'association GUSES
L'association GUSES
 
Open Solaris 2009.06
Open Solaris 2009.06Open Solaris 2009.06
Open Solaris 2009.06
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
Metro Web Services
Metro Web ServicesMetro Web Services
Metro Web Services
 
Retour JavaOne 2009
Retour JavaOne 2009Retour JavaOne 2009
Retour JavaOne 2009
 
Zembly
ZemblyZembly
Zembly
 
Behind The Clouds
Behind The CloudsBehind The Clouds
Behind The Clouds
 
Retour d'expérience Cap Gemini GlassFish
Retour d'expérience Cap Gemini GlassFishRetour d'expérience Cap Gemini GlassFish
Retour d'expérience Cap Gemini GlassFish
 
OpenDS - Open Source Java LDAP server
OpenDS - Open Source Java LDAP serverOpenDS - Open Source Java LDAP server
OpenDS - Open Source Java LDAP server
 
GlassFish v2.1
GlassFish v2.1GlassFish v2.1
GlassFish v2.1
 
Open MQ Jerome Moliere
Open MQ Jerome MoliereOpen MQ Jerome Moliere
Open MQ Jerome Moliere
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

JavaFX 1.0 SDK Aquarium Paris

  • 2. About the Speakers • Martin lead the team responsible for the JavaFX Production Suite • Richard is one of the API leads for JavaFX SDK • Jasper is one of the key engineers on the JavaFX SDK
  • 3. JavaFX is for graphical Java applications across all devices.
  • 4. Agenda • Introduction to JavaFX • (Brief) JavaFX Script • Scene Graph • Animations and Transitions • Q &A
  • 5. Introduction to JavaFX™ • Common APIs across devices • Scales from small devices to powerful desktops • Brings rich media and graphical APIs to Java • Simplifies building graphical consumer and enterprise applications
  • 6. JavaFX Script • Expression language • Declarative and Procedural • Integrates with Java • Loosely based on JavaScript
  • 7. JavaFX Script Explained • JavaFX Script source files are called “scripts” • Everything* in JavaFX Script is an expression • All blocks are expressions • The last line is the result
  • 8. Primitive Data Types • Boolean • Integer • Number • String • Duration • Primitives cannot be null*
  • 9. Declaring Sequences // A sequence of one can omit the brackets var names:String[] = “Richard”; // Empty sequences are not null var names:String[]; println(sizeof names); // prints 0 // elements are accessed by index var names = [“Jasper”, “Richard”, “Martin”]; var martin = names[2]; // and you can populate a sequence using a for loop var hellos = for (i in [1..3]) { “Hello #{i}” }
  • 10. Modifying Sequences // Inserting items into a sequence var names:String[] = “Richard”; insert “Jasper” into names; // Inserting before a certain index insert “Martin” before names[1]; // Inserting after a certain index insert “Duke” after names[1]; // Deleting from the sequence delete “Duke” from names;
  • 11. Operators • +-/* • ++ -- • *= /= += -= • and or not • = == != • mod
  • 12. Flow Control • if ( booleanExpression) • for (i in sequence) { ... } then a else b • Can get index of item • if (booleanExpression) a “i” by “indexof i” else b • break • if (booleanExpression) { a } else { b } • continue • while (booleanExpression) { ... }
  • 13. Bind • bind is a way to tie the • bound variables cannot be value of one variable to set manually the value of an expression • binding must be defined when the variable is initialized • bindings are statically compiled
  • 14. JavaFX Objects public class Distance extends { public var x1:Number; public var x2:Number; // Whenever x2 or x1 changes, distance will be updated // Binding can be used for invariants public-read var distance:Number = bind x2 - x1; }
  • 15. Object Literals • Concise declarative syntax for object creation • Similar to JavaScript • Combine with binding for maximum effect • variable: initial-value • initial-value is an expression
  • 16. Object Literal // creates a Rectangle // x: 10 is not an assignment, it is an initialization! var rect = Rectangle { x: 10 y: 10 width: 100 height: 100 }
  • 17. Nested Literals // creates a Rectangle with a Color for its fill var rect = Rectangle { x: 10 y: 10 width: 100 height: 100 fill: Color { red: 1 green: 0 blue: 0 } }
  • 18. Variables and Literals // A variation that allows me to reference the color later var color:Color; var rect = Rectangle { x: 10 y: 10 width: 100 height: 100 fill: color = Color { red: 1 green: 0 blue: 0 } }
  • 19. Scene Graph • Describes the graphics • Graph is set on a Scene and controls in a scene • Scene is set in a Stage • Each node in the graph has a single parent • Special “group” nodes have zero or more children • “leaf” nodes have no children
  • 20. Scene Graph Group Circle Group Line Rect
  • 21. Scene • Canvas upon which the Scene Graph is displayed • Can set multiple CSS Stylesheets • Can set background color (or set to null) • Can set canvas width / height
  • 22. Stage • Top-level container for • JFrame on desktop the scene • JApplet on web page • Contains only one Scene • SVG player on mobile • Can set Stage width / height • Potentially represented by:
  • 23. Custom Node • Primary method of Scene Graph encapsulation • All other nodes are not extendable • Simply override the create() method
  • 24. Shapes - Building Blocks • Arc • Rectangle • Circle • stroke • Ellipse • strokeWidth • Line • fill • Path • smooth • Polygon
  • 25. Create an App (part 1)
  • 26. Colors • Colors • Color.rgb(128, 222, 21) • 150+ built in colors (all the HTML & CSS built in values) • Color.web(“#aabbcc ”) • Color.web(“blue”)
  • 27. Linear Gradients • startX, startY, endX, • Has an offset endY between 0...1 • Define the direction • Has a Color of the gradient • On the unit square • Stops define each step in the gradient. Each stop
  • 28. Create an App (part 2)
  • 29. Images • ImageView node shows • Preserve ratio images • Fit within a specific • Image represents an in width/height memory Image • When fit on Image • Image can load images level, keeps smaller in FG thread or BG image in memory thread • Both ImageView and Image can scale
  • 30. Create an App (part 3)
  • 31. Text • x, y, TextOrigin • Supports multiline text • By default, text • Use alignment to align positioned such that multiline text (x, y) is left baseline • To center text, • Fonts can be specified compute the center via on Text layout bounds • Favor “fill” over “stroke”
  • 32. Text Box • Used for text input • “action” function is invoked when ENTER • Use CSS to style the pressed TextBox • “columns” specifies the • “text” is changed to preferred width based on the font size and reflect the actual text in the TextBox number of characters to display • “value” is changed when the text is “committed” via ENTER, TAB, etc
  • 33. Effects • Effects are placed on • Reflection Nodes • more... • Many standard built in • DropShadow • ColorAdjust • GaussianBlur • Glow
  • 34. Create an App (part 4)
  • 35. Media • JavaFX supports both visual • MediaView is the Node which and audio media displays the Media • Cross platform JavaFX Media • No built in Movie playing file (fxm, mp3) Control • Also plays native formats (mov, wmv) • Media class represents a media file • MediaPlayer plays a Media file
  • 36. Animation • Animation is a key • Transitions feature of every rich graphics application platform • There are two supported animation types in JavaFX • Keyframe Animations
  • 37. Keyframe Animation • A general purpose • tween keyword and animation mechanism custom interpolators for JavaFX • Long sytax vs short • Uses a concept of a syntax timeline and keyframes specifying values at given times • autorepeat + autoreverse behavior • Built in the language • Actions syntax - can animate any variable • Nested timelines
  • 38. Transitions • “Precanned”, single • Parallel purpose animations • Sequential • Translation/Rotation/ Scale/Fade • Pause Transition • “by” values • Animation along a path • • Containers:
  • 39. Create an App (part 5)
  • 40. JavaFX provides APIs for building creative applications
  • 41. JavaFX will be updtaed regularly and quickly
  • 42. 1.1 release Februrary 2009 1.5 release June 2009
  • 43. JavaFX 1.0 Production Suite for professional graphics