SlideShare uma empresa Scribd logo
1 de 51
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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輝 子安
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a JavaFX

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
 

Semelhante a JavaFX (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
 

Mais 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
 

Mais 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
 

Último

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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Último (20)

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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

JavaFX

  • 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