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 (20)

Java IO
Java IOJava IO
Java IO
 
Java applets
Java appletsJava applets
Java applets
 
Java Thread Synchronization
Java Thread SynchronizationJava Thread Synchronization
Java Thread Synchronization
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
WHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVAWHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVA
 
JavaFX fundamentals
JavaFX fundamentalsJavaFX fundamentals
JavaFX fundamentals
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Java 8 Lambda Built-in Functional Interfaces
Java 8 Lambda Built-in Functional InterfacesJava 8 Lambda Built-in Functional Interfaces
Java 8 Lambda Built-in Functional Interfaces
 
Enumeration in Java Explained | Java Tutorial | Edureka
Enumeration in Java Explained | Java Tutorial | EdurekaEnumeration in Java Explained | Java Tutorial | Edureka
Enumeration in Java Explained | Java Tutorial | Edureka
 
Basics of Java
Basics of JavaBasics of Java
Basics of Java
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Interface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar SinghInterface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar Singh
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
 
Event handling
Event handlingEvent handling
Event handling
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Java API
Java APIJava API
Java API
 
JAVA APPLET BASICS
JAVA APPLET BASICSJAVA APPLET BASICS
JAVA APPLET BASICS
 
Java Collections
Java  Collections Java  Collections
Java Collections
 
CORE JAVA
CORE JAVACORE JAVA
CORE JAVA
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 

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

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Dernier (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

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