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

More Related Content

What's hot

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

What's hot (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
 

Viewers also liked

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
 

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

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

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

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

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

Recently uploaded

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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

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