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

Mestrando em Informática da UFPB
jose.raphael.marques@gmail.com
raphaelmarques.wordpress.com
   JavaFX é a melhor forma para criar conteúdo
    rico expressivo. Baseado na Plataforma Java,
    JavaFX oferece uma atraente combinação de
    onipresença, capacidade, expressividade e
    performance.




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

   Para quem?
     Designers
     Desenvolvedores


                                 6
7
8
9
10
JavaScript   HTML 5


                      11
13
14
15
16
17
18
   Uma única plataforma RIA para todas as telas
   Mercado de amplo alcance
   Fluxo de trabalho designer-desenvolvedor
   Runtime poderoso
   Liberdade do browser
   Compatibilidade com tecnologias Java
                                                   20
   Tipos de dados básicos (não podem ser null)
       Integer
       Number
       Boolean
       Duration

   String
   Sequence
   Function
                                                  22
var string1 = "raphael";
var string2 : String = "raphael";
var integer1 = 3;
var integer2 : Integer = 3;
var number1 = 3.0;
var number2 : Number = 3;
var number3 = 3 as Number;
var number4 = integer1 + number1;

                                    23
TIPAGEM ESTÁTICA
       VS
TIPAGEM DINÂMICA
                   24
println("raphael marques");
//raphael marques

println('raphael marques');
//raphael marques

println("raphael 'marques'");
//raphael 'marques'

println('raphael "marques"');
//raphael "marques"
                                25
var s1 = "raphael";
var s2 = "marques";
println("{s1} {s2}");
//raphael marques

"o valor de x eh: {x}"
"o valor de x eh: {objeto.getX()}"



                                     26
var x = 3;        var x : Integer = 3;
var y = 3.0;      var y : Number = 3.0;
var z: Integer;   var z: Integer = 0;
var w = x + y;    var w: Number = x + y;
var a = false;    var a : Boolean = false;
var b = x < y;    var b : Boolean = x < y;

                                             27
   Integer e Number:      Boolean:
    +                       and
    -                       or
    *                       not
    /
     mod



                                       28
var   t1 : Duration = 1ms;
var   t2 = 1s;
var   t3 = 1m;
var   t4 = 1h;
println("{t1} {t2} {t3} {t4}");
//1ms 500ms 60000ms 3600000ms
println(1s + 500ms);   //1500.0ms
println(1s / 500ms);   //2.0
println(1s*2);         //2000.0ms
println(1s/2);         //500.0ms

                                    29
30
def PI = 3.1416;
function calcArea(raio: Number): Number{
  return PI * raio * raio;
}
var raio = 5;
var area = calcArea(raio);




                                           31
def PI = 3.1416;
function calcArea(raio: Number) {
  return PI * raio * raio;
}
var raio = 5;
var area = calcArea(raio);




                                    32
def PI = 3.1416;
function calcArea(raio: Number) {
  PI * raio * raio;
}
var raio = 5;
var area = calcArea(raio);




                                    33
def PI = 3.1416;
var calcArea = function (raio: Number){
   PI * raio * raio;
};
var calcPerimetro = function(raio: Number){
   2 * PI * raio;
};
var calc = calcArea;
println(calc(5));
calc = calcPerimetro;
println(calc(5));

                                              34
def PI = 3.1416;
var calcArea = function (raio: Number){
   PI * raio * raio;
};
var calcPerimetro = function(raio: Number){
   2 * PI * raio;
};
var calc: function (Number): Number = calcArea;
println(calc(5));
calc = calcPerimetro;
println(calc(5));

                                                  35
class A{
   var x = 0;
   function getx(){
       x;
   }
}
var a = A{x:1};
var b = A{x:2};
var f = a.getx;
var g = b.getx;
println(f()); //1
println(g()); //2


                      36
   JavaFX
     http://javafx.com/

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

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



                                           38
   Windows, Linux, Mac OS X e Solaris x86

   JavaFX 1.2 SDK

   Netbeans IDE 6.5.1 para JavaFX 1.2
   JavaFX 1.2 Production Suite
     Plugin para Adobe Illustrator e Adobe Photoshop
     Media Factory
      ▪ JavaFX Graphics Viewer e SVG Converter
                                                        39
40
41
var x = 1;
var y = bind x;
var z = bind y * 2;
println("{x} {y} {z}");   //1 1 2
x = 2;
println("{x} {y} {z}");   //2 2 4




                                    42
var a = 1;
var b = bind a with inverse;

println("{a} {b}");   //1 1

a = 2;
println("{a} {b}");   //2 2

b = 3;
println("{a} {b}");   //3 3

                               43
var x = 10;
var y = 20;
var rect1 = Rectangle{
   x: bind x;
   y: bind y;
};
var rect2 = bind Rectangle{
   x: x;
   y: y;
};
                              44
var x = 10;
var y = 20;
var lado = 100;                 lado
                        y
var rect = Rectangle{
  x: bind x
                                       lado
  y: bind y
  width: bind lado
  height: bind lado
}                           x


                                         45
var x = 10;                 lado/2

var y = 20;
var lado = 100;
                        y
                                     lado
var rect = Rectangle{
  x: bind x – lado/2
  y: bind y – lado/2
  width: bind lado
  height: bind lado
}                                x


                                            46
var x = 10;
var y = 20;                 lado/2
var lado = 50;
                        y
                                     lado
var rect = Rectangle{
  x: bind x – lado/2
  y: bind y – lado/2
  width: bind lado
  height: bind lado
}                             x


                                            47
def PI = 3.1416;
var raio = 5;
bound function calcArea(){
  PI * raio * raio;
}
var area = bind calcArea();
println(area);           // 78.53999
raio = 10;
println(area);           // 314.15997
                                        48
var a = 1 on replace old{
 println("changing");
 println("old: {old}");
 println("new: {a}");
};
a = 3;
//changing
//old: 0
//new: 1
//changing
//old: 1
//new: 3
                            49
public class HelloWorldSwing{
  public static void main(String[] args){
     JFrame frame =
            new JFrame("HelloWorld Swing");
     JLabel label =
            new JLabel("Hello World");
     frame.getContentPane().add(label);
     frame.setDefaultCloseOperation(
            JFrame.EXIT_ON_CLOSE);
     frame.pack();
     frame.setVisible(true);
  }
}
                                              51
Stage {
  title: "Hello World em JavaFX"
  width: 250 height: 80
  scene: Scene {
      content: Text {
        content: "Hello World!"
        x: 10 y: 30
        font : Font {
           size : 24
        }
      }
  }
}

                                   52
Stage {
  title: "Hello World em JavaFX"
  width: 250 height: 80
  scene: Scene {
      content: Text {
        content: "Hello World!"
        x: 10 y: 30
        font : Font {
           size : 24
        }
      }
  }
}

                                   53
Stage {
  title: "Hello World em JavaFX"
  width: 250 height: 80
  scene: Scene {
      content: Text {
        content: "Hello World!"
        x: 10 y: 30
        font : Font {
           size : 24
        }
      }
  }
}

                                   54
Stage {
  title: "Hello World em JavaFX"
  width: 250 height: 80
  scene: Scene {
      content: Text {
        content: "Hello World!"
        x: 10 y: 30
        font : Font {
           size : 24
        }
      }
  }
}

                                   55
Stage {
  title: "Hello World em JavaFX"
  width: 250 height: 80
  scene: Scene {
      content: Text {
        content: "Hello World!"
        x: 10 y: 30
        font : Font {
           size : 24
        }
      }
  }
}

                                   56
Stage{
  title: "Declarar eh facil!"
  width: 250
  height: 250
}




                                57
Stage{
  title: "Declarar eh facil!"
  scene: Scene{
      width: 250
      height: 250
  }
}




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

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

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

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

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

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

                                  64
...
content: [
    Circle{
      ...
    }
    Rectangle{
      ...
    }
]
...
                 65
...
content: [
    Circle{
      ...
    }
    Rectangle{
      ...
      opacity: 0.6
    }
]
...
                     66
...
Rectangle{
    ...
    transforms: Rotate{
        pivotX: 125 pivotY: 125
        angle: 15
    }
}
...


                                  67
...
Rectangle{
     ...
    rotate: 15
}
...




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



                          69
ImageView{
  image: Image{
     url: "{__DIR__}imagem.png"
  }
  rotate: 15
  scaleX: 2
}


                                  70
71
...
Group{
    translateX: 15           Group
    translateY: 15
    content: [
       Text{
               ...
       }                    Translate
       Circle{
               ...
       }
    ]
}
...                  Text               Circle


                                                 72
73
var x: Number;             var px: Number;
var y: Number;             var py: Number;
...
Rectangle{
    x: bind x
    y: bind y
    ...
    onMousePressed: function(e: MouseEvent){
         px = x;
         py = y;
    }
    onMouseDragged: function(e: MouseEvent){
         x = px + e.dragX;
         y = px + e.dragY;
    }
}
...
                                               74
var x: Number;             var px: Number;
var y: Number;             var py: Number;
...
Rectangle{
    x: bind x
    y: bind y
    ...
    onMousePressed: function(e: MouseEvent){
         px = x;
         py = y;
    }
    onMouseDragged: function(e: MouseEvent){
         x = px + e.dragX;
         y = px + e.dragY;
    }
}
...
                                               75
var x: Number;             var px: Number;
var y: Number;             var py: Number;
...
Rectangle{
    x: bind x
    y: bind y
    ...
    onMousePressed: function(e: MouseEvent){
         px = x;
         py = y;
    }
    onMouseDragged: function(e: MouseEvent){
         x = px + e.dragX;
         y = px + e.dragY;
    }
}
...
                                               76
var x: Number;             var px: Number;
var y: Number;             var py: Number;
...
Rectangle{
    x: bind x
    y: bind y
    ...
    onMousePressed: function(e: MouseEvent){
         px = x;
         py = y;
    }
    onMouseDragged: function(e: MouseEvent){
         x = px + e.dragX;
         y = px + e.dragY;
    }
}
...
                                               77
var x: Number;             var px: Number;
var y: Number;             var py: Number;
...
Rectangle{
    x: bind x
    y: bind y
    ...
    onMousePressed: function(e: MouseEvent){
         px = x;
         py = y;
    }
    onMouseDragged: function(e: MouseEvent){
         x = px + e.dragX;
         y = px + e.dragY;
    }
}
...
                                               78
79
80

Contenu connexe

Tendances

Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision DetectionJenchoke Tachagomain
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2MEJenchoke Tachagomain
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicalsManoj Chauhan
 
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
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignmentAbdullah Al Shiam
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscationguest9006ab
 
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
 
Fertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureFertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureMike Fogus
 
Code as data as code.
Code as data as code.Code as data as code.
Code as data as code.Mike Fogus
 
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...Tao Xie
 
Travel management
Travel managementTravel management
Travel management1Parimal2
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utilsroxlu
 
The Macronomicon
The MacronomiconThe Macronomicon
The MacronomiconMike Fogus
 
Adventures In Data Compilation
Adventures In Data CompilationAdventures In Data Compilation
Adventures In Data CompilationNaughty Dog
 
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
 
Why learn new programming languages
Why learn new programming languagesWhy learn new programming languages
Why learn new programming languagesJonas Follesø
 

Tendances (20)

Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision Detection
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicals
 
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”
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscation
 
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++”
 
Fertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureFertile Ground: The Roots of Clojure
Fertile Ground: The Roots of Clojure
 
Advance java
Advance javaAdvance java
Advance java
 
Code as data as code.
Code as data as code.Code as data as code.
Code as data as code.
 
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
ACM Distinguished Program: Cooperative Testing and Analysis: Human-Tool, Tool...
 
Travel management
Travel managementTravel management
Travel management
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utils
 
OpenGL Starter L01
OpenGL Starter L01OpenGL Starter L01
OpenGL Starter L01
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
The Macronomicon
The MacronomiconThe Macronomicon
The Macronomicon
 
Adventures In Data Compilation
Adventures In Data CompilationAdventures In Data Compilation
Adventures In Data Compilation
 
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
 
Why learn new programming languages
Why learn new programming languagesWhy learn new programming languages
Why learn new programming languages
 
EcmaScript 6
EcmaScript 6 EcmaScript 6
EcmaScript 6
 

En vedette

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
 
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
 
Desenvolvimento rápido de aplicações com JEE e JavaFX
Desenvolvimento rápido de aplicações com JEE e JavaFXDesenvolvimento rápido de aplicações com JEE e JavaFX
Desenvolvimento rápido de aplicações com JEE e JavaFXjesuinoPower
 
Criando aplicações java fx em minutos
Criando aplicações java fx em minutosCriando aplicações java fx em minutos
Criando aplicações java fx em minutosBruno Oliveira
 
Boas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SP
Boas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SPBoas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SP
Boas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SPjesuinoPower
 
JavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaJavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaAlexander_K
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesStephen Chin
 
01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFX01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFXRoman Brovko
 
Refatoração: Como deixar seu código livre de maus Cheiros
Refatoração: Como deixar seu código livre de maus CheirosRefatoração: Como deixar seu código livre de maus Cheiros
Refatoração: Como deixar seu código livre de maus CheirosPedro Hos
 

En vedette (20)

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
 
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
 
JavaFX
JavaFXJavaFX
JavaFX
 
Classes Internas
Classes InternasClasses Internas
Classes Internas
 
Desenvolvimento rápido de aplicações com JEE e JavaFX
Desenvolvimento rápido de aplicações com JEE e JavaFXDesenvolvimento rápido de aplicações com JEE e JavaFX
Desenvolvimento rápido de aplicações com JEE e JavaFX
 
Operadores Java
Operadores JavaOperadores Java
Operadores Java
 
Criando aplicações java fx em minutos
Criando aplicações java fx em minutosCriando aplicações java fx em minutos
Criando aplicações java fx em minutos
 
Boas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SP
Boas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SPBoas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SP
Boas práticas na criação de aplicações sérias com JavaFX - TDC 2014 SP
 
O direito ambiental e sua autonomia atual
O direito ambiental e sua autonomia atualO direito ambiental e sua autonomia atual
O direito ambiental e sua autonomia atual
 
JavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской JavaJavaFX 2.1 - следующее поколение клиентской Java
JavaFX 2.1 - следующее поколение клиентской Java
 
JavaFX technology
JavaFX technologyJavaFX technology
JavaFX technology
 
JavaFX 2.0 overview
JavaFX 2.0 overviewJavaFX 2.0 overview
JavaFX 2.0 overview
 
JavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative LanguagesJavaFX 2.0 and Alternative Languages
JavaFX 2.0 and Alternative Languages
 
01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFX01 - JavaFX. Введение в JavaFX
01 - JavaFX. Введение в JavaFX
 
JavaFX introduction
JavaFX introductionJavaFX introduction
JavaFX introduction
 
JavaFX Advanced
JavaFX AdvancedJavaFX Advanced
JavaFX Advanced
 
Introduction to JavaFX 2
Introduction to JavaFX 2Introduction to JavaFX 2
Introduction to JavaFX 2
 
Refatoração: Como deixar seu código livre de maus Cheiros
Refatoração: Como deixar seu código livre de maus CheirosRefatoração: Como deixar seu código livre de maus Cheiros
Refatoração: Como deixar seu código livre de maus Cheiros
 

Similaire à Mini-curso JavaFX Aula1

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
 
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
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
JavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx VersionJavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx VersionStephen Chin
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manualVivek Kumar Sinha
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]Stephen Chin
 
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
 
Gremlin's Graph Traversal Machinery
Gremlin's Graph Traversal MachineryGremlin's Graph Traversal Machinery
Gremlin's Graph Traversal MachineryMarko Rodriguez
 
DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...
DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...
DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...DataStax
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvmArnaud Giuliani
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoJaehue Jang
 
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티JaeYeoul Ahn
 

Similaire à Mini-curso JavaFX Aula1 (20)

Groovy's Builder
Groovy's BuilderGroovy's Builder
Groovy's Builder
 
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
 
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 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
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
JavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx VersionJavaFX Your Way - Devoxx Version
JavaFX Your Way - Devoxx Version
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manual
 
JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]JavaFX 2.0 With Alternative Languages [Portuguese]
JavaFX 2.0 With Alternative Languages [Portuguese]
 
Myraytracer
MyraytracerMyraytracer
Myraytracer
 
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...
 
Gremlin's Graph Traversal Machinery
Gremlin's Graph Traversal MachineryGremlin's Graph Traversal Machinery
Gremlin's Graph Traversal Machinery
 
DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...
DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...
DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandr...
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
SVGo workshop
SVGo workshopSVGo workshop
SVGo workshop
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
 

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

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
"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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
"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
 

Dernier (20)

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
"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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
"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...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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)
 
"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
 

Mini-curso JavaFX Aula1

  • 1. Raphael Marques Mestrando em Informática da UFPB jose.raphael.marques@gmail.com raphaelmarques.wordpress.com
  • 2.
  • 3. JavaFX é a melhor forma para criar conteúdo rico expressivo. Baseado na Plataforma Java, JavaFX oferece uma atraente combinação de onipresença, capacidade, expressividade e performance. 3
  • 4. 4
  • 5. 5
  • 6. Uma família de tecnologias  JavaFX Runtime  JavaFX Script  JavaFX Tools  Para quem?  Designers  Desenvolvedores 6
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. JavaScript HTML 5 11
  • 12.
  • 13. 13
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. 17
  • 18. 18
  • 19.
  • 20. Uma única plataforma RIA para todas as telas  Mercado de amplo alcance  Fluxo de trabalho designer-desenvolvedor  Runtime poderoso  Liberdade do browser  Compatibilidade com tecnologias Java 20
  • 21.
  • 22. Tipos de dados básicos (não podem ser null)  Integer  Number  Boolean  Duration  String  Sequence  Function 22
  • 23. var string1 = "raphael"; var string2 : String = "raphael"; var integer1 = 3; var integer2 : Integer = 3; var number1 = 3.0; var number2 : Number = 3; var number3 = 3 as Number; var number4 = integer1 + number1; 23
  • 24. TIPAGEM ESTÁTICA VS TIPAGEM DINÂMICA 24
  • 25. println("raphael marques"); //raphael marques println('raphael marques'); //raphael marques println("raphael 'marques'"); //raphael 'marques' println('raphael "marques"'); //raphael "marques" 25
  • 26. var s1 = "raphael"; var s2 = "marques"; println("{s1} {s2}"); //raphael marques "o valor de x eh: {x}" "o valor de x eh: {objeto.getX()}" 26
  • 27. var x = 3; var x : Integer = 3; var y = 3.0; var y : Number = 3.0; var z: Integer; var z: Integer = 0; var w = x + y; var w: Number = x + y; var a = false; var a : Boolean = false; var b = x < y; var b : Boolean = x < y; 27
  • 28. Integer e Number:  Boolean: +  and -  or *  not /  mod 28
  • 29. var t1 : Duration = 1ms; var t2 = 1s; var t3 = 1m; var t4 = 1h; println("{t1} {t2} {t3} {t4}"); //1ms 500ms 60000ms 3600000ms println(1s + 500ms); //1500.0ms println(1s / 500ms); //2.0 println(1s*2); //2000.0ms println(1s/2); //500.0ms 29
  • 30. 30
  • 31. def PI = 3.1416; function calcArea(raio: Number): Number{ return PI * raio * raio; } var raio = 5; var area = calcArea(raio); 31
  • 32. def PI = 3.1416; function calcArea(raio: Number) { return PI * raio * raio; } var raio = 5; var area = calcArea(raio); 32
  • 33. def PI = 3.1416; function calcArea(raio: Number) { PI * raio * raio; } var raio = 5; var area = calcArea(raio); 33
  • 34. def PI = 3.1416; var calcArea = function (raio: Number){ PI * raio * raio; }; var calcPerimetro = function(raio: Number){ 2 * PI * raio; }; var calc = calcArea; println(calc(5)); calc = calcPerimetro; println(calc(5)); 34
  • 35. def PI = 3.1416; var calcArea = function (raio: Number){ PI * raio * raio; }; var calcPerimetro = function(raio: Number){ 2 * PI * raio; }; var calc: function (Number): Number = calcArea; println(calc(5)); calc = calcPerimetro; println(calc(5)); 35
  • 36. class A{ var x = 0; function getx(){ x; } } var a = A{x:1}; var b = A{x:2}; var f = a.getx; var g = b.getx; println(f()); //1 println(g()); //2 36
  • 37.
  • 38. JavaFX  http://javafx.com/  JavaFX Developer Home  http://java.sun.com/javafx/  JavaFX Programing (with Passion!)  http://www.javapassion.com/javafx/ 38
  • 39. Windows, Linux, Mac OS X e Solaris x86  JavaFX 1.2 SDK  Netbeans IDE 6.5.1 para JavaFX 1.2  JavaFX 1.2 Production Suite  Plugin para Adobe Illustrator e Adobe Photoshop  Media Factory ▪ JavaFX Graphics Viewer e SVG Converter 39
  • 40. 40
  • 41. 41
  • 42. var x = 1; var y = bind x; var z = bind y * 2; println("{x} {y} {z}"); //1 1 2 x = 2; println("{x} {y} {z}"); //2 2 4 42
  • 43. var a = 1; var b = bind a with inverse; println("{a} {b}"); //1 1 a = 2; println("{a} {b}"); //2 2 b = 3; println("{a} {b}"); //3 3 43
  • 44. var x = 10; var y = 20; var rect1 = Rectangle{ x: bind x; y: bind y; }; var rect2 = bind Rectangle{ x: x; y: y; }; 44
  • 45. var x = 10; var y = 20; var lado = 100; lado y var rect = Rectangle{ x: bind x lado y: bind y width: bind lado height: bind lado } x 45
  • 46. var x = 10; lado/2 var y = 20; var lado = 100; y lado var rect = Rectangle{ x: bind x – lado/2 y: bind y – lado/2 width: bind lado height: bind lado } x 46
  • 47. var x = 10; var y = 20; lado/2 var lado = 50; y lado var rect = Rectangle{ x: bind x – lado/2 y: bind y – lado/2 width: bind lado height: bind lado } x 47
  • 48. def PI = 3.1416; var raio = 5; bound function calcArea(){ PI * raio * raio; } var area = bind calcArea(); println(area); // 78.53999 raio = 10; println(area); // 314.15997 48
  • 49. var a = 1 on replace old{ println("changing"); println("old: {old}"); println("new: {a}"); }; a = 3; //changing //old: 0 //new: 1 //changing //old: 1 //new: 3 49
  • 50.
  • 51. public class HelloWorldSwing{ public static void main(String[] args){ JFrame frame = new JFrame("HelloWorld Swing"); JLabel label = new JLabel("Hello World"); frame.getContentPane().add(label); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } } 51
  • 52. Stage { title: "Hello World em JavaFX" width: 250 height: 80 scene: Scene { content: Text { content: "Hello World!" x: 10 y: 30 font : Font { size : 24 } } } } 52
  • 53. Stage { title: "Hello World em JavaFX" width: 250 height: 80 scene: Scene { content: Text { content: "Hello World!" x: 10 y: 30 font : Font { size : 24 } } } } 53
  • 54. Stage { title: "Hello World em JavaFX" width: 250 height: 80 scene: Scene { content: Text { content: "Hello World!" x: 10 y: 30 font : Font { size : 24 } } } } 54
  • 55. Stage { title: "Hello World em JavaFX" width: 250 height: 80 scene: Scene { content: Text { content: "Hello World!" x: 10 y: 30 font : Font { size : 24 } } } } 55
  • 56. Stage { title: "Hello World em JavaFX" width: 250 height: 80 scene: Scene { content: Text { content: "Hello World!" x: 10 y: 30 font : Font { size : 24 } } } } 56
  • 57. Stage{ title: "Declarar eh facil!" width: 250 height: 250 } 57
  • 58. Stage{ title: "Declarar eh facil!" scene: Scene{ width: 250 height: 250 } } 58
  • 59. Stage{ ... scene: Scene{ ... content: [ Rectangle{ x: 45 y: 45 width: 160 height: 160 arcWidth: 15 arcHeight: 15 fill: Color.GREEN } ] } } 59
  • 60. Stage{ ... scene: Scene{ ... content: [ Rectangle{ x: 45 y: 45 width: 160 height: 160 arcWidth: 15 arcHeight: 15 fill: Color.GREEN } ] } } 60
  • 61. Stage{ ... scene: Scene{ ... content: [ Rectangle{ x: 45 y: 45 width: 160 height: 160 arcWidth: 15 arcHeight: 15 fill: Color.GREEN } ] } } 61
  • 62. Stage{ ... scene: Scene{ ... content: [ Rectangle{ x: 45 y: 45 width: 160 height: 160 arcWidth: 15 arcHeight: 15 fill: Color.GREEN } ] } } 62
  • 63. ... content: [ Rectangle{ ... } Circle{ centerX: 125 centerY: 125 radius: 90 fill: Color.WHITE stroke: Color.RED } ] ... 63
  • 64. ... content: [ Rectangle{ ... } Circle{ centerX: 125 centerY: 125 radius: 90 fill: Color.WHITE stroke: Color.RED } ] ... 64
  • 65. ... content: [ Circle{ ... } Rectangle{ ... } ] ... 65
  • 66. ... content: [ Circle{ ... } Rectangle{ ... opacity: 0.6 } ] ... 66
  • 67. ... Rectangle{ ... transforms: Rotate{ pivotX: 125 pivotY: 125 angle: 15 } } ... 67
  • 68. ... Rectangle{ ... rotate: 15 } ... 68
  • 69. ... Rectangle{ ... effect: Lighting{ surfaceScale: 5 } } ... 69
  • 70. ImageView{ image: Image{ url: "{__DIR__}imagem.png" } rotate: 15 scaleX: 2 } 70
  • 71. 71
  • 72. ... Group{ translateX: 15 Group translateY: 15 content: [ Text{ ... } Translate Circle{ ... } ] } ... Text Circle 72
  • 73. 73
  • 74. var x: Number; var px: Number; var y: Number; var py: Number; ... Rectangle{ x: bind x y: bind y ... onMousePressed: function(e: MouseEvent){ px = x; py = y; } onMouseDragged: function(e: MouseEvent){ x = px + e.dragX; y = px + e.dragY; } } ... 74
  • 75. var x: Number; var px: Number; var y: Number; var py: Number; ... Rectangle{ x: bind x y: bind y ... onMousePressed: function(e: MouseEvent){ px = x; py = y; } onMouseDragged: function(e: MouseEvent){ x = px + e.dragX; y = px + e.dragY; } } ... 75
  • 76. var x: Number; var px: Number; var y: Number; var py: Number; ... Rectangle{ x: bind x y: bind y ... onMousePressed: function(e: MouseEvent){ px = x; py = y; } onMouseDragged: function(e: MouseEvent){ x = px + e.dragX; y = px + e.dragY; } } ... 76
  • 77. var x: Number; var px: Number; var y: Number; var py: Number; ... Rectangle{ x: bind x y: bind y ... onMousePressed: function(e: MouseEvent){ px = x; py = y; } onMouseDragged: function(e: MouseEvent){ x = px + e.dragX; y = px + e.dragY; } } ... 77
  • 78. var x: Number; var px: Number; var y: Number; var py: Number; ... Rectangle{ x: bind x y: bind y ... onMousePressed: function(e: MouseEvent){ px = x; py = y; } onMouseDragged: function(e: MouseEvent){ x = px + e.dragX; y = px + e.dragY; } } ... 78
  • 79. 79
  • 80. 80