SlideShare a Scribd company logo
1 of 33
Download to read offline
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

More Related Content

What's hot (20)

Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
JPA and Hibernate
JPA and HibernateJPA and Hibernate
JPA and Hibernate
 
Java Collections Framework
Java Collections FrameworkJava Collections Framework
Java Collections Framework
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Java 8 date & time api
Java 8 date & time apiJava 8 date & time api
Java 8 date & time api
 
Tomcat
TomcatTomcat
Tomcat
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
 
Spring & hibernate
Spring & hibernateSpring & hibernate
Spring & hibernate
 
Servlets
ServletsServlets
Servlets
 
Presentation1
Presentation1Presentation1
Presentation1
 
Servlets
ServletsServlets
Servlets
 
Java Swing
Java SwingJava Swing
Java Swing
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Servlet
Servlet Servlet
Servlet
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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
 

More from José Maria Silveira Neto

More from 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
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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