SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
JavaFX
      overview


Silveira Neto
Sun Campus Ambassador
silveira@sun.com, silveiraneto@gmail.com,        2008 Presentation at CEJUG event
silveiraneto.net                            Café com Tapioca at Christus University
Agenda
                                                  What is JavaFX

                                                    Demos

                                                  JavaFX Framework

                                                   JavaFX Script

                                                   Where To Go
Fireworks photo by Darrell Taylor at http://flickr.com/photos/d4rr3ll/300075196/
What is JavaFX?
• A family of products
 > JavaFX Framework
    > JavaFX Runtime
    > JavaFX Mobile
    > JavaFX Script
• Who
 > Developers
 > Designers
• What
 > RIA
JavaFX
demos
Introduction: What is Java FX?
“JavaFX  Script  is  a  highly  productive  scripting  language  that 
enables  content  developers  to  create  rich  media  and  content 
for  deployment  on  Java  environments.  JavaFX  Script  is  a 
declarative, statically­typed programming language. It has first­
class  functions,  declarative  syntax,  list­comprehensions,  and 
incremental dependency­based evaluation. It can make direct 
calls to Java APIs that are on the platform.”

­­https://openjfx.dev.java.net/
JavaFX Overview
The JavaFX tm Platform is a rich client platform for cross­screen 
  rich internet applications (RIA) and content. It consists of 
  common elements (2D graphics, Animation, Text and Media) 
  and device specific elements for desktop, mobile and TV. The 
  JavaFX common set of APIs allow source level portability of 
  the common set of functionalities across all platforms 
  supported by JavaFX. The JavaFX Runtimes targeted for 
  different devices will ensure consistency and fidelity for 
  content created based on the JavaFX Common APIs. The 
  JavaFX Common APIs will continue to evolve to match more 
  powerful, common capabilities on the various device types.
JavaFX Stack
JavaFX Architecture
Scene Graph Project
• Example, javafx.scene.geometry
 > Ellipse          > Polygon
 > Polyline         > Line
 > Arc              > Circle
 > Path             > ArcTo
 > ShapeSubtract    > PathElement
 > QuadCurve        > HlineTo
 > DelegateShape    > VlineTo
 > ClosePath        > CurveTo
 > CubicCurve       > QuadTo
 > Shape            > ShapeIntersect
 > LineTo           > MoveTo
 > SVGPath          > Rectangle
Circle
import javafx.scene.geometry.*;
import javafx.scene.paint.*;

Circle {
  centerX: 100
  centerY: 100
  radius: 50
  fill: Color.BLACK
}
Rectangle
import javafx.scene.geometry.*;
import javafx.scene.paint.*;

Rectangle {
    x: 50
    y: 50
    width: 200
    height: 100
    arcWidth: 20
    arcHeight: 20
    fill: Color.BLACK
}
Ellipse
import javafx.scene.geometry.*;
import javafx.scene.paint.*;

Ellipse {
    centerX: 50
    centerY: 50
    radiusX: 50
    radiusY: 25
    fill: Color.BLACK
}
ShapeIntersect
import javafx.scene.geometry.*;
import javafx.scene.paint.*;

ShapeIntersect {
    fill: Color.BLACK
    a: Rectangle { width: 100 height: 50 }
    b: Ellipse {
        centerX: 100
        centerY: 25
        radiusX: 50
        radiusY: 25
     }
}
ShapeSubtract
import javafx.scene.geometry.*;
import javafx.scene.paint.*;

ShapeSubtract {
    fill: Color.BLACK
    a: Rectangle { width: 100 height: 50 }
    b: Ellipse {
        centerX: 100
        centerY: 25
        radiusX: 50
        radiusY: 25
     }
}
Animation Framework
• javafx.animation
 >   Interpolatable
 >   Interpolator
 >   KeyFrame
 >   KeyValue
 >   SimpleInterpolator
 >   Timeline
JavaFX Script Language
• Declarative syntax
  >   GUI
  >   Swing
  >   Data binding
  >   Incremental evaluation
• Statically typed
  > and code structuring, reuse, and 
      encapsulation features that enable creating 
      and maintaining very large programs in the 
      Java programming language.
Script
• A “scriptquot; is one or more declarations or 
  expressions.

  import java.lang.System;

  var ten : Integer = 10;
  var s = quot;Twice {ten} is {2 * ten}.quot;);

  // s == “Twice 10 is 20”.



• No main, classes or functions are mandatory.
Class
 class Knight {
     attribute health   = 100;
     attribute strength = 10;

     function isDead(){
       return health > 0
     }

     function hurt(amount: Integer){
         health -= amount
     }
 }
Objects
 var myKnight = Knight {}

 var megaKnight = Knight {
       health: 150;
     strength: 15;
 }

 myKnight.hurt(megaKnight.strength);

 // myKight.health = 85
Basic Data Types
  JavaFX    Default value        Java
String     “”               java.lang.String
Boolean    false            java.lang.Boolean
Number     0                java.lang.Number
Integer    0.0              byte, short, int, long, BigInteger
Duration   N/A              N/A
String Examples
 var   s1   =   quot;Javaquot;;
 var   s2   =   quot;FXquot;;
 var   s3   =   quot;Java{s2}quot;; // s3 = 'Hello Joe'
 var   s4   =   quot;{s1}{s2}quot;; // s4 = quot;JavaFXquot;
Boolean Examples
 var cool = true;
 var s = quot;Java{if(cool)quot;FXquot;elsequot;Scriptquot;}quot;;
 //s = quot;JavaFXquot;

 var   a   =   true;      //   a   =   true
 var   b   =   false;     //   b   =   false
 var   c   =   a and b;   //   c   =   false
 var   d   =   a or b;    //   d   =   true
 var   e   =   not a;     //   e   =   false
Duration Examples
var   t1   =   5ms;   //   5 milliseconds
var   t2   =   10s;   //   10 seconds
var   t3   =   30m;   //   30 minutes
var   t4   =   1h;    //   1 hour

var t5 = t1 + t2 + t3 + t4;
// 1 hour 30 min 10 secs and 5 millisecs
Sequences Examples
var x = [1,2,3];
// array initialization

insert 10 into x;
// [1, 2, 3, 10]

insert 12 before x[1];
// [1, 12, 2, 3, 10]

delete 12 from x;
// [1, 2, 3, 10]

insert [1..10] into x;
// [1, 2, 3, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
JavaFX Command Line Interface
• Compiling
 > javafxc script.fx
• Running
 > javafx script
JavaFX Tools
•   Project Nile
•   NetBeans IDE JavaFX Plug­in
•   Your favorite IDE + JavaFX CLI
•   Inkscape
    > Coming soon (next version)
    > File → Save As → JavaFx
Java FX Resources
• Java FX Project Site: http://openjfx.dev.java.net
  > Java.net: Download early versions of Java FX
  > IDE Plugins, Tutorials, Forums, FAQs
  > “Getting Started With the JavaFX Script Language”
  > “JavaFX Script 2D Graphics Tutorial”
  > “The JavaFX Script Programming Language Reference”

• Planet FX Wiki: http://jfx.wikia.com/wiki/Main_Page
  > Open­source documentation site for Java FX

• James Weaver's Blog
  > Best blog about JavaFX
  > http://learnjavafx.typepad.com/
Java FX Resources (more)
• Sun's Java FX Site:
  > http://www.sun.com/software/javafx/
  > http://www.javafx.com
  > Sun Microsystems official product page

• Chris Oliver's Blog: http://blogs.sun.com/chrisoliver/
  > Latest news, other informal information
  > Source code for lots of demos (Space Invaders, Calculator)

• My blog :­)
  > http://silveiraneto.net
JavaFX Books
• JavaFX Script: Dynamic Java Scripting for 
  Rich Internet/Client­side Application, by 
  James L. Weaver, published by Apress.
• Dynamische und interaktive Java­
  Applikationen mit JavaFX, by Ralph 
  Steyer, published by Addison­Wesley.
• はじめての JavaFX― 最新スクリトプト言
  語の基礎を徹底解説 ! by  清水美樹 , 
  published by  工学社 .
References
•   Balloons photo from first and last slides by Jesus Solana
    >  http://flickr.com/photos/pasotraspaso/1408057351/

•   Fireworks photo at agenda by Darrell Taylor
    >  http://flickr.com/photos/d4rr3ll/300075196/

•   Lots of JavaOne 2008 JavaFX's Presentations
    >   http://developers.sun.com/learning/javaoneonline/
•   JavaFx Preview 1 API
    >   http://javafx.com/releases/preview1/docs/api/
•   Javafx.com Videos
    >   http://www.javafx.com
•   My Youtube JavaFX Channel
    >   http://br.youtube.com/user/NetoSilveira
•   JavaFX NetBeans Plugin
    >   http://javafx.netbeans.org/
Open Source University Meetup
• OSUM
  >   http://osum.sun.com
  >   http://osum.sun.com/group/ufc/
  >   http://osum.sun.com/group/fchristus
  >   http://osum.sun.com/group/fa7
  >   http://osum.sun.com/group/cefetce
  >   http://osum.sun.com/group/uva
  > http://osum.sun.com/group/javafx
• Enter and create your own
Java FX   • Download Java FX & IDE 
            Plugins for Netbeans or 
What to     Eclipse
Do        • Join OpenJFX Java.net 
            Project
          • Do Java FX Tutorials
          • Participate on Java FX 
            Forums
          • Create something cool!

            http://openjfx.dev.java.net
Thank you!
Silveira Neto
Sun Campus Ambassador
mail: silveira@sun.com
IM/mail: silveiraneto@gmail.com
                                                     Some rights reserved
blog: http://silveiraneto.net     download these slides at silveiraneto.net

Contenu connexe

Tendances

Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentationguest11106b
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate pptAneega
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Edureka!
 
Hibernate
HibernateHibernate
HibernateAjay K
 
Collections In Java
Collections In JavaCollections In Java
Collections In JavaBinoj T E
 
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaJava Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaEdureka!
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket ProgrammingVipin Yadav
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introductionejlp12
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners Varun Raj
 

Tendances (20)

Java J2EE
Java J2EEJava J2EE
Java J2EE
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate ppt
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
Java Tutorial | Java Programming Tutorial | Java Basics | Java Training | Edu...
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Hibernate
HibernateHibernate
Hibernate
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Collections In Java
Collections In JavaCollections In Java
Collections In Java
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaJava Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
 
SQLite database in android
SQLite database in androidSQLite database in android
SQLite database in android
 
Java Beans
Java BeansJava Beans
Java Beans
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket Programming
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 

En vedette

8 True Stories about JavaFX
8 True Stories about JavaFX8 True Stories about JavaFX
8 True Stories about JavaFXYuichi Sakuraba
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesJavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesStephen Chin
 
JavaFX 8 - GUI by Illusion
JavaFX 8 - GUI by IllusionJavaFX 8 - GUI by Illusion
JavaFX 8 - GUI by IllusionYuichi Sakuraba
 
JavaFX - Straight from the trenches
JavaFX - Straight from the trenchesJavaFX - Straight from the trenches
JavaFX - Straight from the trenchesAnderson Braz
 
Scratching the Surface with JavaFX
Scratching the Surface with JavaFXScratching the Surface with JavaFX
Scratching the Surface with JavaFXjavafxpert
 
JavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaJavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaAlexander_K
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesStephen Chin
 
01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFX01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFXRoman Brovko
 
Java Fx - Return of client Java
Java Fx - Return of client JavaJava Fx - Return of client Java
Java Fx - Return of client JavaShuji Watanabe
 
DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)Hendrik Ebbers
 
JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)Alexander Casall
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFXTom Mix Petreca
 

En vedette (20)

8 True Stories about JavaFX
8 True Stories about JavaFX8 True Stories about JavaFX
8 True Stories about JavaFX
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative LanguagesJavaFX Your Way: Building JavaFX Applications with Alternative Languages
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
 
JavaFX 8 - GUI by Illusion
JavaFX 8 - GUI by IllusionJavaFX 8 - GUI by Illusion
JavaFX 8 - GUI by Illusion
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
JavaFX - Straight from the trenches
JavaFX - Straight from the trenchesJavaFX - Straight from the trenches
JavaFX - Straight from the trenches
 
Scratching the Surface with JavaFX
Scratching the Surface with JavaFXScratching the Surface with JavaFX
Scratching the Surface with JavaFX
 
JavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaJavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской Java
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative Languages
 
JavaFX technology
JavaFX technologyJavaFX technology
JavaFX technology
 
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
 
From Swing to JavaFX
From Swing to JavaFXFrom Swing to JavaFX
From Swing to JavaFX
 
Java Fx - Return of client Java
Java Fx - Return of client JavaJava Fx - Return of client Java
Java Fx - Return of client Java
 
JavaFX Advanced
JavaFX AdvancedJavaFX Advanced
JavaFX Advanced
 
Introduction to JavaFX 2
Introduction to JavaFX 2Introduction to JavaFX 2
Introduction to JavaFX 2
 
DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)DataFX 8 (JavaOne 2014)
DataFX 8 (JavaOne 2014)
 
JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)JavaFX in Action (devoxx'16)
JavaFX in Action (devoxx'16)
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFX
 
Java FX
Java FXJava FX
Java FX
 

Similaire à JavaFX Overview

Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1rajivmordani
 
Wicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On TimeWicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On TimeWill Hoover
 
XML-Free Programming
XML-Free ProgrammingXML-Free Programming
XML-Free ProgrammingStephen Chin
 
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...Stephen Chin
 
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...Stephen Chin
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Tugdual Grall
 
The Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideThe Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideStephen Chin
 
JavaFX8 TestFX - CDI
JavaFX8   TestFX - CDIJavaFX8   TestFX - CDI
JavaFX8 TestFX - CDISven Ruppert
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptHazelcast
 
Ten Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesTen Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesHenrik Olsson
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009Ralph Whitbeck
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicTimothy Perrett
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Alex Motley
 
Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011Anton Arhipov
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]Stephen Chin
 
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaFrom Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaAlexandre Morgaut
 

Similaire à JavaFX Overview (20)

Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
Wicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On TimeWicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On Time
 
XML-Free Programming
XML-Free ProgrammingXML-Free Programming
XML-Free Programming
 
JavaFX
JavaFXJavaFX
JavaFX
 
JavaFX
JavaFXJavaFX
JavaFX
 
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
 
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
JavaFX 2.0 With Alternative Languages - Groovy, Clojure, Scala, Fantom, and V...
 
Scripting Oracle Develop 2007
Scripting Oracle Develop 2007Scripting Oracle Develop 2007
Scripting Oracle Develop 2007
 
JavaFXScript
JavaFXScriptJavaFXScript
JavaFXScript
 
The Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S GuideThe Java Fx Platform – A Java Developer’S Guide
The Java Fx Platform – A Java Developer’S Guide
 
JavaFX8 TestFX - CDI
JavaFX8   TestFX - CDIJavaFX8   TestFX - CDI
JavaFX8 TestFX - CDI
 
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScriptThe Power of the JVM: Applied Polyglot Projects with Java and JavaScript
The Power of the JVM: Applied Polyglot Projects with Java and JavaScript
 
Ten Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesTen Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project Experiences
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)
 
Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011Java Bytecode For Discriminating Developers - GeeCON 2011
Java Bytecode For Discriminating Developers - GeeCON 2011
 
Resthub lyonjug
Resthub lyonjugResthub lyonjug
Resthub lyonjug
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]
 
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaFrom Web App Model Design to Production with Wakanda
From Web App Model Design to Production with Wakanda
 

Plus de José Maria Silveira Neto

Plus de José Maria Silveira Neto (19)

Android - visão geral
Android - visão geralAndroid - visão geral
Android - visão geral
 
Pixelart
PixelartPixelart
Pixelart
 
Tomorrow Java
Tomorrow JavaTomorrow Java
Tomorrow Java
 
JavaFX Primeiros Passos
JavaFX Primeiros PassosJavaFX Primeiros Passos
JavaFX Primeiros Passos
 
Desenvolvimento de Aplicações
Desenvolvimento de AplicaçõesDesenvolvimento de Aplicações
Desenvolvimento de Aplicações
 
Apresentando o CEJUG e o poder do Java
Apresentando o CEJUG e o poder do JavaApresentando o CEJUG e o poder do Java
Apresentando o CEJUG e o poder do Java
 
Let's talk about Certifications
Let's talk about CertificationsLet's talk about Certifications
Let's talk about Certifications
 
NetBeans: a IDE que você precisa
NetBeans: a IDE que você precisaNetBeans: a IDE que você precisa
NetBeans: a IDE que você precisa
 
OpenSolaris a Céu Aberto
OpenSolaris a Céu AbertoOpenSolaris a Céu Aberto
OpenSolaris a Céu Aberto
 
Database Technologies for Semantic Web
Database Technologies for Semantic WebDatabase Technologies for Semantic Web
Database Technologies for Semantic Web
 
High-Performance Computing and OpenSolaris
High-Performance Computing and OpenSolarisHigh-Performance Computing and OpenSolaris
High-Performance Computing and OpenSolaris
 
SVG como exemplo de XML
SVG como exemplo de XMLSVG como exemplo de XML
SVG como exemplo de XML
 
Questões de Certificação SCJP
Questões de Certificação SCJPQuestões de Certificação SCJP
Questões de Certificação SCJP
 
Microformatos em 10 minutos
Microformatos em 10 minutosMicroformatos em 10 minutos
Microformatos em 10 minutos
 
Participation Era, Sun and You
Participation Era, Sun and YouParticipation Era, Sun and You
Participation Era, Sun and You
 
Let's talk about certification: SCJA
Let's talk about certification: SCJALet's talk about certification: SCJA
Let's talk about certification: SCJA
 
Uma Olhada no Netbeans 6
Uma Olhada no Netbeans 6Uma Olhada no Netbeans 6
Uma Olhada no Netbeans 6
 
Real World Technologies
Real World TechnologiesReal World Technologies
Real World Technologies
 
Novidades no Netbeans 6
Novidades no Netbeans 6Novidades no Netbeans 6
Novidades no Netbeans 6
 

Dernier

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

JavaFX Overview

  • 1. JavaFX overview Silveira Neto Sun Campus Ambassador silveira@sun.com, silveiraneto@gmail.com, 2008 Presentation at CEJUG event silveiraneto.net Café com Tapioca at Christus University
  • 2. Agenda What is JavaFX Demos JavaFX Framework JavaFX Script Where To Go Fireworks photo by Darrell Taylor at http://flickr.com/photos/d4rr3ll/300075196/
  • 3. What is JavaFX? • A family of products > JavaFX Framework > JavaFX Runtime > JavaFX Mobile > JavaFX Script • Who > Developers > Designers • What > RIA
  • 5. Introduction: What is Java FX? “JavaFX  Script  is  a  highly  productive  scripting  language  that  enables  content  developers  to  create  rich  media  and  content  for  deployment  on  Java  environments.  JavaFX  Script  is  a  declarative, statically­typed programming language. It has first­ class  functions,  declarative  syntax,  list­comprehensions,  and  incremental dependency­based evaluation. It can make direct  calls to Java APIs that are on the platform.” ­­https://openjfx.dev.java.net/
  • 6. JavaFX Overview The JavaFX tm Platform is a rich client platform for cross­screen  rich internet applications (RIA) and content. It consists of  common elements (2D graphics, Animation, Text and Media)  and device specific elements for desktop, mobile and TV. The  JavaFX common set of APIs allow source level portability of  the common set of functionalities across all platforms  supported by JavaFX. The JavaFX Runtimes targeted for  different devices will ensure consistency and fidelity for  content created based on the JavaFX Common APIs. The  JavaFX Common APIs will continue to evolve to match more  powerful, common capabilities on the various device types.
  • 9. Scene Graph Project • Example, javafx.scene.geometry > Ellipse > Polygon > Polyline > Line > Arc > Circle > Path > ArcTo > ShapeSubtract > PathElement > QuadCurve > HlineTo > DelegateShape > VlineTo > ClosePath > CurveTo > CubicCurve > QuadTo > Shape > ShapeIntersect > LineTo > MoveTo > SVGPath > Rectangle
  • 10. Circle import javafx.scene.geometry.*; import javafx.scene.paint.*; Circle { centerX: 100 centerY: 100 radius: 50 fill: Color.BLACK }
  • 11. Rectangle import javafx.scene.geometry.*; import javafx.scene.paint.*; Rectangle { x: 50 y: 50 width: 200 height: 100 arcWidth: 20 arcHeight: 20 fill: Color.BLACK }
  • 12. Ellipse import javafx.scene.geometry.*; import javafx.scene.paint.*; Ellipse { centerX: 50 centerY: 50 radiusX: 50 radiusY: 25 fill: Color.BLACK }
  • 13. ShapeIntersect import javafx.scene.geometry.*; import javafx.scene.paint.*; ShapeIntersect { fill: Color.BLACK a: Rectangle { width: 100 height: 50 } b: Ellipse { centerX: 100 centerY: 25 radiusX: 50 radiusY: 25 } }
  • 14. ShapeSubtract import javafx.scene.geometry.*; import javafx.scene.paint.*; ShapeSubtract { fill: Color.BLACK a: Rectangle { width: 100 height: 50 } b: Ellipse { centerX: 100 centerY: 25 radiusX: 50 radiusY: 25 } }
  • 15. Animation Framework • javafx.animation > Interpolatable > Interpolator > KeyFrame > KeyValue > SimpleInterpolator > Timeline
  • 16. JavaFX Script Language • Declarative syntax > GUI > Swing > Data binding > Incremental evaluation • Statically typed > and code structuring, reuse, and  encapsulation features that enable creating  and maintaining very large programs in the  Java programming language.
  • 17. Script • A “scriptquot; is one or more declarations or  expressions. import java.lang.System; var ten : Integer = 10; var s = quot;Twice {ten} is {2 * ten}.quot;); // s == “Twice 10 is 20”. • No main, classes or functions are mandatory.
  • 18. Class class Knight { attribute health = 100; attribute strength = 10; function isDead(){ return health > 0 } function hurt(amount: Integer){ health -= amount } }
  • 19. Objects var myKnight = Knight {} var megaKnight = Knight { health: 150; strength: 15; } myKnight.hurt(megaKnight.strength); // myKight.health = 85
  • 20. Basic Data Types JavaFX Default value Java String “” java.lang.String Boolean false java.lang.Boolean Number 0 java.lang.Number Integer 0.0 byte, short, int, long, BigInteger Duration N/A N/A
  • 21. String Examples var s1 = quot;Javaquot;; var s2 = quot;FXquot;; var s3 = quot;Java{s2}quot;; // s3 = 'Hello Joe' var s4 = quot;{s1}{s2}quot;; // s4 = quot;JavaFXquot;
  • 22. Boolean Examples var cool = true; var s = quot;Java{if(cool)quot;FXquot;elsequot;Scriptquot;}quot;; //s = quot;JavaFXquot; var a = true; // a = true var b = false; // b = false var c = a and b; // c = false var d = a or b; // d = true var e = not a; // e = false
  • 23. Duration Examples var t1 = 5ms; // 5 milliseconds var t2 = 10s; // 10 seconds var t3 = 30m; // 30 minutes var t4 = 1h; // 1 hour var t5 = t1 + t2 + t3 + t4; // 1 hour 30 min 10 secs and 5 millisecs
  • 24. Sequences Examples var x = [1,2,3]; // array initialization insert 10 into x; // [1, 2, 3, 10] insert 12 before x[1]; // [1, 12, 2, 3, 10] delete 12 from x; // [1, 2, 3, 10] insert [1..10] into x; // [1, 2, 3, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  • 25. JavaFX Command Line Interface • Compiling > javafxc script.fx • Running > javafx script
  • 26. JavaFX Tools • Project Nile • NetBeans IDE JavaFX Plug­in • Your favorite IDE + JavaFX CLI • Inkscape > Coming soon (next version) > File → Save As → JavaFx
  • 27. Java FX Resources • Java FX Project Site: http://openjfx.dev.java.net > Java.net: Download early versions of Java FX > IDE Plugins, Tutorials, Forums, FAQs > “Getting Started With the JavaFX Script Language” > “JavaFX Script 2D Graphics Tutorial” > “The JavaFX Script Programming Language Reference” • Planet FX Wiki: http://jfx.wikia.com/wiki/Main_Page > Open­source documentation site for Java FX • James Weaver's Blog > Best blog about JavaFX > http://learnjavafx.typepad.com/
  • 28. Java FX Resources (more) • Sun's Java FX Site: > http://www.sun.com/software/javafx/ > http://www.javafx.com > Sun Microsystems official product page • Chris Oliver's Blog: http://blogs.sun.com/chrisoliver/ > Latest news, other informal information > Source code for lots of demos (Space Invaders, Calculator) • My blog :­) > http://silveiraneto.net
  • 29. JavaFX Books • JavaFX Script: Dynamic Java Scripting for  Rich Internet/Client­side Application, by  James L. Weaver, published by Apress. • Dynamische und interaktive Java­ Applikationen mit JavaFX, by Ralph  Steyer, published by Addison­Wesley. • はじめての JavaFX― 最新スクリトプト言 語の基礎を徹底解説 ! by  清水美樹 ,  published by  工学社 .
  • 30. References • Balloons photo from first and last slides by Jesus Solana >  http://flickr.com/photos/pasotraspaso/1408057351/ • Fireworks photo at agenda by Darrell Taylor >  http://flickr.com/photos/d4rr3ll/300075196/ • Lots of JavaOne 2008 JavaFX's Presentations > http://developers.sun.com/learning/javaoneonline/ • JavaFx Preview 1 API > http://javafx.com/releases/preview1/docs/api/ • Javafx.com Videos > http://www.javafx.com • My Youtube JavaFX Channel > http://br.youtube.com/user/NetoSilveira • JavaFX NetBeans Plugin > http://javafx.netbeans.org/
  • 31. Open Source University Meetup • OSUM > http://osum.sun.com > http://osum.sun.com/group/ufc/ > http://osum.sun.com/group/fchristus > http://osum.sun.com/group/fa7 > http://osum.sun.com/group/cefetce > http://osum.sun.com/group/uva > http://osum.sun.com/group/javafx • Enter and create your own
  • 32. Java FX • Download Java FX & IDE  Plugins for Netbeans or  What to Eclipse Do • Join OpenJFX Java.net  Project • Do Java FX Tutorials • Participate on Java FX  Forums • Create something cool! http://openjfx.dev.java.net
  • 33. Thank you! Silveira Neto Sun Campus Ambassador mail: silveira@sun.com IM/mail: silveiraneto@gmail.com Some rights reserved blog: http://silveiraneto.net download these slides at silveiraneto.net