SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Sandeep Rawat
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
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!
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)M Ahsan Khan
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC ArchitecturePrem Sanil
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentationivpol
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 

Was ist angesagt? (20)

Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
JDBC ppt
JDBC pptJDBC ppt
JDBC ppt
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
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 Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Jpa
JpaJpa
Jpa
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
JDBC
JDBCJDBC
JDBC
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Servlets
ServletsServlets
Servlets
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von José Maria Silveira Neto

Mehr von 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
 

Kürzlich hochgeladen

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
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
 
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
 
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
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 

Kürzlich hochgeladen (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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...
 
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
 
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
 
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
 
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...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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 ...
 
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...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 

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