SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
Raphael Marques

Mestrando em Informática da UFPB
jose.raphael.marques@gmail.com
raphaelmarques.wordpress.com
O que é JavaFX?


    Coisas que você pode construir com JavaFX


    Por que JavaFX?


    JavaFX Script


    GUI com JavaFX


    Por onde começar?


    Exemplos


                                                2
4
Uma família de tecnologias

     JavaFX Runtime
     JavaFX Script
     JavaFX Tools

    Para quem?

     Designers
     Desenvolvedores


                                 5
7
8
9
10
11
12
13
Uma única plataforma RIA para todas as telas

     Desktop, browser e celular (futuramente TVs)


    Mercado de amplo alcance

     Bilhões de dispositivos


    Fluxo de trabalho designer-desenvolvedor

     Redução drástica do ciclo de desenvolvimento

                                                     15
Runtime poderoso

     Onipresença, poder, performance e segurança do
     Java

    Liberdade do browser

     Arraste suas aplicações do browser para o
     desktop

    Compatibilidade com tecnologias Java

     Use qualquer biblioteca Java
                                                       16
def RAIO = 4;
def PI = 3.1415;
var area = PI * RAIO * RAIO;

println(“a area eh: {area}” );
//a area eh: 50264



                                 18
var ativado = true;
var visivel: Boolean = false;
println(quot;Ativado: {ativado}quot;);
//Ativado: true
println(quot;Visivel: {visivel}quot;);
//Visivel: false
visivel = true;
println(quot;Visivel: {visivel}quot;);
//Visivel: true
                                 19
var inteiro: Integer = 3;
var numero: Number = 3.0;
println(quot;inteiro: {inteiro}quot;);
//inteiro: 3
println(quot;numero: {numero}quot;);
//numero: 3.0
println(quot;conversao: {numero as Integer}quot;);
//conversao: 3

                                             20
var s1 = quot;Helloquot;;
var s2: String = quot;Helloquot;;
var s3 = quot;Hello 'world'quot;;
var s4 = 'Hello quot;worldquot;';
println(s3);
//Hello 'world'
println(s4);
//Hello quot;worldquot;

                            21
var s1 = quot;Javaquot;;
var s2 = quot;FXquot;;
var s3 = quot;{s1}{s2}quot;;

println(s3);
//JavaFX



                       22
var d1 = 1ms;
var d2 = 1s;
var d3: Duration = 1m;
var d4: Duration = 1h;

var d5 = 1m + 15s;



                         23
def PI = 3.1415;
def RAIO = 4;

println(quot;area: {getArea(RAIO)}quot;);
//area: 50.264

function getArea(raio: Number): Number{
  var area = PI * raio * raio;
  return area;
}
                                          24
class Conta{
  var nome: String;
  var numeroDaConta: Integer;
  var saldo: Number = 1000;
}
var conta = Conta{
  nome: quot;Raphael Marquesquot;
  numeroDaConta: 123456
}
println(quot;nome: {conta.nome}quot;);
//nome: Raphael Marques
                                 25
class Conta{
  var nome: String;
  var numeroDaConta: Integer;
  var saldo: Number = 1000;

    function deposito(valor: Number){
      saldo += valor;
    }
}
                                        26
var software: String[]
                  = [quot;Solarisquot;, quot;Javaquot;, quot;JavaFXquot;];
var hardware: String[]
                  = [quot;Atomquot;, quot;Sempronquot;, quot;GForcequot;];
var produtos = [software hardware];
println(software);
//[ Solaris, Java, JavaFX ]
println(hardware);
//[ Atom, Sempron, GForce ]
println(produtos);
//[ Solaris, Java, JavaFX, Atom, Sempron, GForce ]


                                                     27
var n1: Integer[] = [1..10];
var n2: Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var n3: Integer[] = [1, 2, 3, 5, 4, 6, 7, 8, 9, 10];
var n4: Integer[] = [1..11];
println(quot;{n1 == n2}quot;);
//true
println(quot;{n1 == n3}quot;);
//false
println(quot;{n1 == n4}quot;);
//false

                                                       28
var n1: Integer[] = [1..10];
var n2: Integer[] = n1;
var n3 = n1[valor | (valor mod 2) == 0];
println(n3);
//[ 2, 4, 6, 8, 10 ]
var n5 = [1..10 step 2];
println(n5);
//[ 1, 3, 5, 7, 9 ]
var n6 = for(n in n1){n * 2};
println(n6);
//[ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 ]

                                           29
var variavel1 = 0;
var variavel2 = bind variavel1;
variavel1 = 5;
println(variavel2); //5
variavel1 = 10;
println(variavel2); //10
var variavel3 = bind variavel2 * variavel2;
println(variavel3); //100

                                              30
var a = quot;Raphael Marquesquot;;
var b = 123456;
var c = 1000;

var conta = bind Conta{
  nome: a
  numeroDaConta: b
  saldo: c
}
                             31
var a = quot;Raphael Marquesquot;;
var b = 123456;
var c = 1000;

var conta = Conta{
  nome: bind a
  numeroDaConta: bind b
  saldo: bind c
}
                             32
public class HelloWorldSwing{
  public static void main(String[] args){
     JFrame frame =
            new JFrame(quot;HelloWorld Swingquot;);
     JLabel label =
            new JLabel(quot;Hello Worldquot;);
     frame.getContentPane().add(label);
     frame.setDefaultCloseOperation(
            JFrame.EXIT_ON_CLOSE);
     frame.pack();
     frame.setVisible(true);
  }
}
                                              34
Stage {
  title: quot;Hello World em JavaFXquot;
  width: 250 height: 80
  scene: Scene {
      content: Text {
        content: quot;Hello World!quot;
        x: 10 y: 30
        font : Font {
           size : 24
        }
      }
  }
}

                                   35
Stage{
  title: quot;Declarar eh facil!quot;
  width: 250
  height: 250
}




                                36
Stage{
  title: quot;Declarar eh facil!quot;
  scene: Scene{
      width: 250
      height: 250
  }
}




                                37
Stage{
  ...
  scene: Scene{
      ...
      content: [
          Rectangle{
            x: 45 y: 45
            width: 160 height: 160
            arcWidth: 15 arcHeight: 15
            fill: Color.GREEN
          }
      ]
  }
}

                                         38
...
content: [
    Rectangle{
      ...
    }
    Circle{
      centerX: 125 centerY: 125
      radius: 90
      fill: Color.WHITE
      stroke: Color.RED
    }
]
...

                                  39
...
content: [
    Circle{
      ...
    }
    Rectangle{
      ...
    }
]
...
                 40
...
content: [
    Circle{
      ...
    }
    Rectangle{
      ...
      opacity: 0.6
    }
]
...
                     41
...
Rectangle{
    ...
    transforms: Rotate{
        pivotX: 125 pivotY: 125
        angle: 15
    }
}
...


                                  42
...
Rectangle{
    ...
    effect: Lighting{
        surfaceScale: 5
    }
}
...



                          43
var x: Number;        var y: Number;
var dx: Number;       var dy: Number;

...
Rectangle{
    x: bind 45 + x + dx
    y: bind 45 + y + dy
    ...
    onMouseDragged: function(e: MouseEvent){
        dx = e.dragX; dy = e.dragY;
    }
    onMouseReleased: function(e: MouseEvent){
        x += dx; y += dy;
        dx = 0;    dy = 0;
    }
}
...
                                                44
...
Group{
                                     Group
    transforms: Translate{
       x: 15 y: 15
    }
    content: [
       Text{
          ...                       Translate
       }
       Circle{
          ...
       }
    ]
                             Text               Circle
}
...
                                                         45
46
JavaFX

     http://javafx.com/

    JavaFX Developer Home

     http://java.sun.com/javafx/

    JavaFX Programing (with Passion!)

     http://www.javapassion.com/javafx/



                                           48
Windows e Mac OS X


    Netbeans IDE 6.5 para JavaFX 1.1.1


    JavaFX 1.1 Production Suite

     Plugin para Adobe Illustrator e Adobe Photoshop
     Media Factory
      ▪ JavaFX Graphics Viewer e SVG Converter

    JavaFX 1.1.1 SDK

                                                        49
50
Raphael Marques

Mestrando em Informática da UFPB
jose.raphael.marques@gmail.com
raphaelmarques.wordpress.com

Contenu connexe

Tendances

Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the raceVictor_Cr
 
Rainer Grimm, “Functional Programming in C++11”
Rainer Grimm, “Functional Programming in C++11”Rainer Grimm, “Functional Programming in C++11”
Rainer Grimm, “Functional Programming in C++11”Platonov Sergey
 
openFrameworks 007 - GL
openFrameworks 007 - GL openFrameworks 007 - GL
openFrameworks 007 - GL roxlu
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the raceVictor_Cr
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utilsroxlu
 
The Macronomicon
The MacronomiconThe Macronomicon
The MacronomiconMike Fogus
 
Modern c++ Memory Management
Modern c++ Memory ManagementModern c++ Memory Management
Modern c++ Memory ManagementAlan Uthoff
 
The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.6 book - Part 184 of 189The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.6 book - Part 184 of 189Mahmoud Samir Fayed
 
Bartosz Milewski, “Re-discovering Monads in C++”
Bartosz Milewski, “Re-discovering Monads in C++”Bartosz Milewski, “Re-discovering Monads in C++”
Bartosz Milewski, “Re-discovering Monads in C++”Platonov Sergey
 
A basic introduction to open cv for image processing
A basic introduction to open cv for image processingA basic introduction to open cv for image processing
A basic introduction to open cv for image processingChu Lam
 
openFrameworks 007 - video
openFrameworks 007 - videoopenFrameworks 007 - video
openFrameworks 007 - videoroxlu
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsDavid Keener
 
Java, Up to Date Sources
Java, Up to Date SourcesJava, Up to Date Sources
Java, Up to Date Sources輝 子安
 

Tendances (20)

Lecture4
Lecture4Lecture4
Lecture4
 
Lecture4
Lecture4Lecture4
Lecture4
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the race
 
Rainer Grimm, “Functional Programming in C++11”
Rainer Grimm, “Functional Programming in C++11”Rainer Grimm, “Functional Programming in C++11”
Rainer Grimm, “Functional Programming in C++11”
 
openFrameworks 007 - GL
openFrameworks 007 - GL openFrameworks 007 - GL
openFrameworks 007 - GL
 
Lecture4
Lecture4Lecture4
Lecture4
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the race
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utils
 
The Macronomicon
The MacronomiconThe Macronomicon
The Macronomicon
 
Modern c++ Memory Management
Modern c++ Memory ManagementModern c++ Memory Management
Modern c++ Memory Management
 
The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.6 book - Part 184 of 189The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.6 book - Part 184 of 189
 
Concurrencyproblem
ConcurrencyproblemConcurrencyproblem
Concurrencyproblem
 
Bartosz Milewski, “Re-discovering Monads in C++”
Bartosz Milewski, “Re-discovering Monads in C++”Bartosz Milewski, “Re-discovering Monads in C++”
Bartosz Milewski, “Re-discovering Monads in C++”
 
A basic introduction to open cv for image processing
A basic introduction to open cv for image processingA basic introduction to open cv for image processing
A basic introduction to open cv for image processing
 
openFrameworks 007 - video
openFrameworks 007 - videoopenFrameworks 007 - video
openFrameworks 007 - video
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector Graphics
 
Lambda expressions in C++
Lambda expressions in C++Lambda expressions in C++
Lambda expressions in C++
 
Java, Up to Date Sources
Java, Up to Date SourcesJava, Up to Date Sources
Java, Up to Date Sources
 
Why MacRuby Matters
Why MacRuby MattersWhy MacRuby Matters
Why MacRuby Matters
 
GCD in Action
GCD in ActionGCD in Action
GCD in Action
 

En vedette

Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)Raphael Marques
 
JavaFX: A nova biblioteca gráfica da plataforma Java
JavaFX: A nova biblioteca gráfica da plataforma JavaJavaFX: A nova biblioteca gráfica da plataforma Java
JavaFX: A nova biblioteca gráfica da plataforma JavajesuinoPower
 

En vedette (7)

JavaFX
JavaFXJavaFX
JavaFX
 
Introdução ao JavaFX
Introdução ao JavaFXIntrodução ao JavaFX
Introdução ao JavaFX
 
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
 
JavaFX 1.2
JavaFX 1.2JavaFX 1.2
JavaFX 1.2
 
Classes Internas
Classes InternasClasses Internas
Classes Internas
 
Operadores Java
Operadores JavaOperadores Java
Operadores Java
 
JavaFX: A nova biblioteca gráfica da plataforma Java
JavaFX: A nova biblioteca gráfica da plataforma JavaJavaFX: A nova biblioteca gráfica da plataforma Java
JavaFX: A nova biblioteca gráfica da plataforma Java
 

Similaire à JavaFX: Introdução à Plataforma de Desenvolvimento RIA

Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...Naresha 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
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
JavaFX - Next Generation Java UI
JavaFX - Next Generation Java UIJavaFX - Next Generation Java UI
JavaFX - Next Generation Java UIYoav Aharoni
 
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
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to CodingFabio506452
 
Managing GraphQL servers with AWS Fargate & Prisma Cloud
Managing GraphQL servers  with AWS Fargate & Prisma CloudManaging GraphQL servers  with AWS Fargate & Prisma Cloud
Managing GraphQL servers with AWS Fargate & Prisma CloudNikolas Burk
 
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
 
Effective Java with Groovy - How Language can Influence Good Practices
Effective Java with Groovy - How Language can Influence Good PracticesEffective Java with Groovy - How Language can Influence Good Practices
Effective Java with Groovy - How Language can Influence Good PracticesNaresha K
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011Stephen 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
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for CassandraEdward Capriolo
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"DataStax Academy
 
Boost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineeringBoost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineeringMiro Wengner
 
What’s new in Google Dart - Seth Ladd
What’s new in Google Dart - Seth LaddWhat’s new in Google Dart - Seth Ladd
What’s new in Google Dart - Seth Laddjaxconf
 

Similaire à JavaFX: Introdução à Plataforma de Desenvolvimento RIA (20)

Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
Effective Java with Groovy & Kotlin - How Languages Influence Adoption of Goo...
 
JavaFX introduction
JavaFX introductionJavaFX introduction
JavaFX introduction
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative Languages
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
JavaFX - Next Generation Java UI
JavaFX - Next Generation Java UIJavaFX - Next Generation Java UI
JavaFX - Next Generation Java UI
 
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...
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
Managing GraphQL servers with AWS Fargate & Prisma Cloud
Managing GraphQL servers  with AWS Fargate & Prisma CloudManaging GraphQL servers  with AWS Fargate & Prisma Cloud
Managing GraphQL servers with AWS Fargate & Prisma Cloud
 
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
 
Effective Java with Groovy - How Language can Influence Good Practices
Effective Java with Groovy - How Language can Influence Good PracticesEffective Java with Groovy - How Language can Influence Good Practices
Effective Java with Groovy - How Language can Influence Good Practices
 
Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
Javafx Overview 90minutes
Javafx Overview 90minutesJavafx Overview 90minutes
Javafx Overview 90minutes
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011
 
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...
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
 
Boost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineeringBoost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineering
 
What’s new in Google Dart - Seth Ladd
What’s new in Google Dart - Seth LaddWhat’s new in Google Dart - Seth Ladd
What’s new in Google Dart - Seth Ladd
 

Plus de Raphael Marques

Introdução a Informática - Arquitetura
Introdução a Informática - ArquiteturaIntrodução a Informática - Arquitetura
Introdução a Informática - ArquiteturaRaphael Marques
 
O que você produz além de código?
O que você produz além de código?O que você produz além de código?
O que você produz além de código?Raphael Marques
 
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)Raphael Marques
 
Slides de PDI 2009 - Raphael Update 5
Slides de PDI 2009 - Raphael Update 5Slides de PDI 2009 - Raphael Update 5
Slides de PDI 2009 - Raphael Update 5Raphael Marques
 
slides PDI 2007 leonardo
slides PDI 2007 leonardoslides PDI 2007 leonardo
slides PDI 2007 leonardoRaphael Marques
 
Slides PDI 2009 Raphael versao4
Slides PDI 2009 Raphael versao4Slides PDI 2009 Raphael versao4
Slides PDI 2009 Raphael versao4Raphael Marques
 

Plus de Raphael Marques (11)

Sistemas numéricos
Sistemas numéricosSistemas numéricos
Sistemas numéricos
 
Windows explorer
Windows explorerWindows explorer
Windows explorer
 
Interface do windows
Interface do windowsInterface do windows
Interface do windows
 
Internet
InternetInternet
Internet
 
Introdução a Informática - Arquitetura
Introdução a Informática - ArquiteturaIntrodução a Informática - Arquitetura
Introdução a Informática - Arquitetura
 
O que você produz além de código?
O que você produz além de código?O que você produz além de código?
O que você produz além de código?
 
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
Aplicações desktop (GUI) e aplicações ricas para internet (RIA)
 
Slides de PDI 2009 - Raphael Update 5
Slides de PDI 2009 - Raphael Update 5Slides de PDI 2009 - Raphael Update 5
Slides de PDI 2009 - Raphael Update 5
 
slides PDI 2007 leonardo
slides PDI 2007 leonardoslides PDI 2007 leonardo
slides PDI 2007 leonardo
 
Slides PDI 2009 Raphael versao4
Slides PDI 2009 Raphael versao4Slides PDI 2009 Raphael versao4
Slides PDI 2009 Raphael versao4
 
Minicurso Java && Cl
Minicurso Java && ClMinicurso Java && Cl
Minicurso Java && Cl
 

Dernier

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Dernier (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

JavaFX: Introdução à Plataforma de Desenvolvimento RIA

  • 1. Raphael Marques Mestrando em Informática da UFPB jose.raphael.marques@gmail.com raphaelmarques.wordpress.com
  • 2. O que é JavaFX?  Coisas que você pode construir com JavaFX  Por que JavaFX?  JavaFX Script  GUI com JavaFX  Por onde começar?  Exemplos  2
  • 3.
  • 4. 4
  • 5. Uma família de tecnologias   JavaFX Runtime  JavaFX Script  JavaFX Tools Para quem?   Designers  Desenvolvedores 5
  • 6.
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14.
  • 15. Uma única plataforma RIA para todas as telas   Desktop, browser e celular (futuramente TVs) Mercado de amplo alcance   Bilhões de dispositivos Fluxo de trabalho designer-desenvolvedor   Redução drástica do ciclo de desenvolvimento 15
  • 16. Runtime poderoso   Onipresença, poder, performance e segurança do Java Liberdade do browser   Arraste suas aplicações do browser para o desktop Compatibilidade com tecnologias Java   Use qualquer biblioteca Java 16
  • 17.
  • 18. def RAIO = 4; def PI = 3.1415; var area = PI * RAIO * RAIO; println(“a area eh: {area}” ); //a area eh: 50264 18
  • 19. var ativado = true; var visivel: Boolean = false; println(quot;Ativado: {ativado}quot;); //Ativado: true println(quot;Visivel: {visivel}quot;); //Visivel: false visivel = true; println(quot;Visivel: {visivel}quot;); //Visivel: true 19
  • 20. var inteiro: Integer = 3; var numero: Number = 3.0; println(quot;inteiro: {inteiro}quot;); //inteiro: 3 println(quot;numero: {numero}quot;); //numero: 3.0 println(quot;conversao: {numero as Integer}quot;); //conversao: 3 20
  • 21. var s1 = quot;Helloquot;; var s2: String = quot;Helloquot;; var s3 = quot;Hello 'world'quot;; var s4 = 'Hello quot;worldquot;'; println(s3); //Hello 'world' println(s4); //Hello quot;worldquot; 21
  • 22. var s1 = quot;Javaquot;; var s2 = quot;FXquot;; var s3 = quot;{s1}{s2}quot;; println(s3); //JavaFX 22
  • 23. var d1 = 1ms; var d2 = 1s; var d3: Duration = 1m; var d4: Duration = 1h; var d5 = 1m + 15s; 23
  • 24. def PI = 3.1415; def RAIO = 4; println(quot;area: {getArea(RAIO)}quot;); //area: 50.264 function getArea(raio: Number): Number{ var area = PI * raio * raio; return area; } 24
  • 25. class Conta{ var nome: String; var numeroDaConta: Integer; var saldo: Number = 1000; } var conta = Conta{ nome: quot;Raphael Marquesquot; numeroDaConta: 123456 } println(quot;nome: {conta.nome}quot;); //nome: Raphael Marques 25
  • 26. class Conta{ var nome: String; var numeroDaConta: Integer; var saldo: Number = 1000; function deposito(valor: Number){ saldo += valor; } } 26
  • 27. var software: String[] = [quot;Solarisquot;, quot;Javaquot;, quot;JavaFXquot;]; var hardware: String[] = [quot;Atomquot;, quot;Sempronquot;, quot;GForcequot;]; var produtos = [software hardware]; println(software); //[ Solaris, Java, JavaFX ] println(hardware); //[ Atom, Sempron, GForce ] println(produtos); //[ Solaris, Java, JavaFX, Atom, Sempron, GForce ] 27
  • 28. var n1: Integer[] = [1..10]; var n2: Integer[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; var n3: Integer[] = [1, 2, 3, 5, 4, 6, 7, 8, 9, 10]; var n4: Integer[] = [1..11]; println(quot;{n1 == n2}quot;); //true println(quot;{n1 == n3}quot;); //false println(quot;{n1 == n4}quot;); //false 28
  • 29. var n1: Integer[] = [1..10]; var n2: Integer[] = n1; var n3 = n1[valor | (valor mod 2) == 0]; println(n3); //[ 2, 4, 6, 8, 10 ] var n5 = [1..10 step 2]; println(n5); //[ 1, 3, 5, 7, 9 ] var n6 = for(n in n1){n * 2}; println(n6); //[ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 ] 29
  • 30. var variavel1 = 0; var variavel2 = bind variavel1; variavel1 = 5; println(variavel2); //5 variavel1 = 10; println(variavel2); //10 var variavel3 = bind variavel2 * variavel2; println(variavel3); //100 30
  • 31. var a = quot;Raphael Marquesquot;; var b = 123456; var c = 1000; var conta = bind Conta{ nome: a numeroDaConta: b saldo: c } 31
  • 32. var a = quot;Raphael Marquesquot;; var b = 123456; var c = 1000; var conta = Conta{ nome: bind a numeroDaConta: bind b saldo: bind c } 32
  • 33.
  • 34. public class HelloWorldSwing{ public static void main(String[] args){ JFrame frame = new JFrame(quot;HelloWorld Swingquot;); JLabel label = new JLabel(quot;Hello Worldquot;); frame.getContentPane().add(label); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } } 34
  • 35. Stage { title: quot;Hello World em JavaFXquot; width: 250 height: 80 scene: Scene { content: Text { content: quot;Hello World!quot; x: 10 y: 30 font : Font { size : 24 } } } } 35
  • 36. Stage{ title: quot;Declarar eh facil!quot; width: 250 height: 250 } 36
  • 37. Stage{ title: quot;Declarar eh facil!quot; scene: Scene{ width: 250 height: 250 } } 37
  • 38. Stage{ ... scene: Scene{ ... content: [ Rectangle{ x: 45 y: 45 width: 160 height: 160 arcWidth: 15 arcHeight: 15 fill: Color.GREEN } ] } } 38
  • 39. ... content: [ Rectangle{ ... } Circle{ centerX: 125 centerY: 125 radius: 90 fill: Color.WHITE stroke: Color.RED } ] ... 39
  • 40. ... content: [ Circle{ ... } Rectangle{ ... } ] ... 40
  • 41. ... content: [ Circle{ ... } Rectangle{ ... opacity: 0.6 } ] ... 41
  • 42. ... Rectangle{ ... transforms: Rotate{ pivotX: 125 pivotY: 125 angle: 15 } } ... 42
  • 43. ... Rectangle{ ... effect: Lighting{ surfaceScale: 5 } } ... 43
  • 44. var x: Number; var y: Number; var dx: Number; var dy: Number; ... Rectangle{ x: bind 45 + x + dx y: bind 45 + y + dy ... onMouseDragged: function(e: MouseEvent){ dx = e.dragX; dy = e.dragY; } onMouseReleased: function(e: MouseEvent){ x += dx; y += dy; dx = 0; dy = 0; } } ... 44
  • 45. ... Group{ Group transforms: Translate{ x: 15 y: 15 } content: [ Text{ ... Translate } Circle{ ... } ] Text Circle } ... 45
  • 46. 46
  • 47.
  • 48. JavaFX   http://javafx.com/ JavaFX Developer Home   http://java.sun.com/javafx/ JavaFX Programing (with Passion!)   http://www.javapassion.com/javafx/ 48
  • 49. Windows e Mac OS X  Netbeans IDE 6.5 para JavaFX 1.1.1  JavaFX 1.1 Production Suite   Plugin para Adobe Illustrator e Adobe Photoshop  Media Factory ▪ JavaFX Graphics Viewer e SVG Converter JavaFX 1.1.1 SDK  49
  • 50. 50
  • 51. Raphael Marques Mestrando em Informática da UFPB jose.raphael.marques@gmail.com raphaelmarques.wordpress.com