SlideShare a Scribd company logo
SVJFXUG – JavaFX Mobile Dojo



February 10, 2010
Hinkmond Wong
Senior Staff Engineer
Sun Oracle

                               1
Agenda
Introduction
End-to-end deployment: Moving JavaFX apps from
  Desktop to Mobile
JavaFX Mobile Do's and Dont's
Java ME integration: Co-mingling JavaFX code with
  Java ME
Demo: JavaFX Mobile running on cool devices
Q&A




                                                    2
Agenda
Introduction
End-to-end deployment: Moving JavaFX apps from
  Desktop to Mobile
JavaFX Mobile Do's and Dont's
Java ME integration: Co-mingling JavaFX code with
  Java ME
Demo: JavaFX Mobile running on cool devices




                                                    3
JavaFX: Simple, Declarative Scripting
Language
             class HelloWorld {
                var message : String;
                function print() { println(message); }
             }
             var name = "Jan";
             var hello = HelloWorld {
                message: bind "Hello {name}!"
             }
             hello.print(); // prints Hello Jan!
             name = "Brian";
             hello.print(); // prints Hello Brian!




                                                         4
JavaFX Scenegraph
Tree-like structure of graphical nodes
Easy way of vector graphics representation

Scene {
  Group {                   javafx.scene.shape
    Rectangle,                   Rectangle
    Circle
  }
}                                      javafx.scene.shape
                                              Circle



                                                            5
JavaFX Block Diagram
   JavaFX Applications and Services

   JavaFX Apps Framework
                                                Authoring
                                                 Tools
    JavaFX         JavaFX         JavaFX
    Desktop         Mobile          TV             Developer
    Runtime        Runtime        Runtime            Tools
                                                (IDE Plug ins, RAD,
                                                  Production Suite)
     Desktop         Mobile           TV
    Extensions     Extensions     Extensions        Designer
                                                     Tools
   JavaFX Common Profile                       (Authoring, Publishing,
                                                  Media Encoding)



   Java Platform (Java Plug in)

                                                                         6
JavaFX Common Profile Features
 Components                                    Features
Compiler and
 Languages     SE 5 and CLDC Target


               Geometric shapes, lines,            Clip with arbitrary geometric shapes
               curves, arc                         Image masks
Graphics       Transparency                        Fullscreen support
               Gradient, color fill, texture       transforms (rotate, scale skew)
               Stroke styles

               True Type font rendering
Text           Transforms (rotate, scale, skew)
               Content embedded font

                                                                                          7
JavaFX Common Profile Features
 Components                            Features
              Key frame animation             Standard animations
Animation     with tweening                   (rotate, zoom, slide)
              Path-based animation

              Cross platform audio (mp3)      Volume and audio balance control
              and video (On2)
Media         Codec native media framework
              support (DirectShow and
              Core Video), play, pause, seek,
              volume, balance, speed controls
              Web services (JSON/XML parser, RESTful APIs)
Other         Common text input control (CSS skinning)
              Input handling (keyboard, mouse, touch, etc.)

                                                                                 8
JavaFX Developer Tool Chain
Media Assets                     Assets          Integrated   Emulated By
 Created By                  Transformed By       Into IDEs   (If Required)

        Adobe
     Illustrator
                                                  JavaFX
                                                  Plug-in
               Adobe
                                                 for IDEs
             Photoshop        JavaFX                          JavaFX
                             Production                        Mobile
                               Suite             JavaFX       Emulator
        On2 Flix                                 Compiler
        Encoders
     (JavaFX File Format,
        VP6 and MP3)


             Adobe CS3
               (Flash and            3rd Party
              Flash Video,
              JavaFX 1.5)            RAD Tool


                                                                              9
JavaFX Plugin for NetBeans




                             10
Incorporate Existing Visual Assets with
JavaFX Production Suite




                                          11
JavaFX Script
class HelloWorld {
    var message : String;
    function print() { println(message);
  }
}
var name = "Jan";
var hello = HelloWorld {
    message: bind "Hello {name}!"
}
hello.print(); // prints Hello Jan!
name = "Brian";
hello.print(); // prints Hello Brian!
                                           12
Mobile vs. Desktop

                      k top       on
                 es             mm        ile
               D              Co       Mob



Common profile
Most of JavaFX is "common"
Different implementations
Platform specific APIs
Performance
Capabilities
                                                13
High level architecture
                    Java FX Application
 JavaFX Application Runtime

 JavaFX Language Runtime
                  SJWC: CLDC + MIDP + MSA

Application deployed as MIDlet
Full access to all JavaFX and device features
Language runtime is common for all profiles


                                                14
JavaFX Mobile Architecture

               JavaFX Runtime
     (Common API, SceneGraph, Media, Webservices)


     Sun Java Wireless Client
         (CLDC, MIDP 2.0, JSR 135)



   Software                   OpenVG                   OpenGL-ES
   Renderer


   Mobile Device

   Default Stack                2D Accelerated Stack   3D Accelerated Stack


                                                                              15
JavaFX Mobile - Packaging
                      JavaFX
                                                Java code
                       code



                    JavaFX compiler            Java compiler



 Pre-verification



                                                                Optionally bundled with
                                Static code analysis
      JAR                                                      JavaFX Platform Runtime
                               performance and size
(CLDC ready code)
                                   optimizations


                                                                                          16
Agenda
Introduction
End-to-end deployment: Moving JavaFX apps from
  Desktop to Mobile
JavaFX Mobile Do's and Dont's
Java ME integration: Co-mingling JavaFX code with
  Java ME
Demo: JavaFX Mobile running on cool devices




                                                    17
Moving JavaFX from Desktop to Mobile
Josh Marinacci's Tech Tip
  http://javafx.com/docs/techtips/mobile_sample/
Program only in Common Profile
  No use of Swing
  No use of Effects javafx.scene.effect
  No direct Java API calls
Keep screen size and orientation changeable
Allow for different Input Methods
  Keyboard vs. Touch Screen/Stylus
Keep in mind performance differences
Keep in mind graphics capabilities

                                                   18
Moving JavaFX from Desktop to Mobile
                         Desktop: Perspective Transform
                         Mouse clicks trigger action




Mobile: No tricky
transforms, Touch-
based or cursor key
trigger action, screen
size sensitive

                                                      19
Agenda
Introduction
End-to-end deployment: Moving JavaFX apps from
  Desktop to Mobile
JavaFX Mobile Do's and Dont's
Java ME integration: Co-mingling JavaFX code with
  Java ME
Demo: JavaFX Mobile running on cool devices




                                                    20
JavaFX Mobile Do's and Don'ts
                                     Do complex graphics off-line
Fancy graphics can be pre-rendered
                                     Add dynamic content (ex. text)
                                     at runtime




                                                                      21
JavaFX Mobile Do's and Don'ts
Michael Heinrichs' Mobile Best Practices:
  http://java.sun.com/developer/technicalArticles/javafx/mobile
Avoid unnecessary bindings
Keep the scenegraph small
Use simple shapes instead of images
Use pre-scaling
Use background loading
Use Integer instead of Number
Use functions of class Sequences



                                                                  22
Agenda
Introduction
End-to-end deployment: Moving JavaFX apps from
  Desktop to Mobile
JavaFX Mobile Do's and Dont's
Java ME integration: Co-mingling JavaFX code with
  Java ME
Demo: JavaFX Mobile running on cool devices




                                                    23
Java ME integration: Co-mingling
JavaFX code with Java ME
Will tie JavaFX app to Java ME platform (no cross-
 screen compatibility)
Access JSRs (optional functionality) on mobile devices
  Bluetooth
  GPS
  SMS text messaging
  etc.
One-way calls: JavaFX calling Java ME APIs
Use def whenever possible
Use Functions Outside Class

                                                         24
Java ME integration: Co-mingling
JavaFX code with Java ME
 import javax.microedition.*;
 ...
 def socket =
  Connector.open("socket://localhost:
  10001");
 def sc = socket as
  javax.microedition.io.SocketConnection
  ;

 def is = sc.openInputStream() as
  InputStream;
 def os = sc.openOutputStream() as
  OutputStream;                            25
Java ME integration: Co-mingling
JavaFX code with Java ME
 os.write(("connect:").getBytes());
 os.flush();

 os.write(("update:").getBytes());
 os.flush();

 os.close();
 sc.close();



                                      26
Co-mingling Bind of UI to the Controller

Java ME MIDP contains existing functionality
  (Controller) event code
Use of Bind in JavaFX
   Link attributes, so when one changes other
     automatic changes happen
Triggering from input events
   Bind JavaFX UI events to call MIDP code
Using data from MIDP
   JavaFX objects hold onto MIDP data to pass to
     MIDP when bind events occur


                                                   27
Co-mingling Bind UI to the Controller

Animations
Graphics Events
Transitions




                                        28
Co-mingling Bind of UI to the Controller

Example of Bind from JavaFX to MIDP:
Label {
   text: bind data.value
}
operation getCountFromMIDP( ) {
   ...
   // Use MIDP Java ME calls to get data
}




                                           29
Co-mingling JavaFX UI Event to Java
ME
var zipCodeText: TextBox = TextBox {
    blocksMouse: true
    columns: 7
    selectOnFocus: false
    text: "95054"
    onKeyPressed:function(e:KeyEvent) {
    if(e.code == KeyCode.VK_ENTER) {
      // Call Java ME APIs here
      // Ex. Get location-based services
      // ...
    }
}
                                           30
DEMO

JavaFX Mobile




                31
Q&A



February 10, 2010
Hinkmond Wong
Senior Staff Engineer
Sun Oracle

                        32
SVJFXUG – JavaFX Mobile Dojo



February 10, 2010

Hinkmond Wong
Senior Staff Engineer
Sun Oracle


                               33
Backup Slides




                34

More Related Content

What's hot

Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
Mohit Belwal
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
sbobde
 
Understanding
Understanding Understanding
Understanding
Arun Gupta
 
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Edureka!
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
Arun Gupta
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
Anil Kumar
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Edureka!
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
Eugene Bogaart
 
Java 7 workshop
Java 7 workshopJava 7 workshop
Java 7 workshop
Dennis Laumen
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
Stephen Chin
 
JEE Course - JEE Overview
JEE Course - JEE  OverviewJEE Course - JEE  Overview
JEE Course - JEE Overview
odedns
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
Shreedhar Ganapathy
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
Arun Gupta
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Marakana Inc.
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
Codecamp Romania
 
GlassFish OSGi Server
GlassFish OSGi ServerGlassFish OSGi Server
GlassFish OSGi Server
Artur Alves
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
Arun Gupta
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
Ryan Cuprak
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
Arun Gupta
 
Java 1
Java 1Java 1

What's hot (20)

Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
Understanding
Understanding Understanding
Understanding
 
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
Lambda Expressions in Java | Java Lambda Tutorial | Java Certification Traini...
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Java 7 workshop
Java 7 workshopJava 7 workshop
Java 7 workshop
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
 
JEE Course - JEE Overview
JEE Course - JEE  OverviewJEE Course - JEE  Overview
JEE Course - JEE Overview
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
GlassFish OSGi Server
GlassFish OSGi ServerGlassFish OSGi Server
GlassFish OSGi Server
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Java 1
Java 1Java 1
Java 1
 

Viewers also liked

Ceam conferecia taller 12 nov 2010 errores bmix
Ceam conferecia taller 12 nov 2010 errores bmixCeam conferecia taller 12 nov 2010 errores bmix
Ceam conferecia taller 12 nov 2010 errores bmix
CEAM UFRO
 
Look to you spanish
Look to you   spanishLook to you   spanish
Look to you spanish
camilo
 
Paula Menna Barreto Hall
Paula Menna Barreto HallPaula Menna Barreto Hall
Paula Menna Barreto Hall
Paula Menna Barreto Hall
 
Infecciones respiratorias virales
Infecciones respiratorias viralesInfecciones respiratorias virales
Infecciones respiratorias virales
degarden
 
Alberto rubio sanchez, rousseau
Alberto rubio sanchez, rousseauAlberto rubio sanchez, rousseau
Alberto rubio sanchez, rousseau
rubiogamo10
 
De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...
De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...
De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...
EOI Escuela de Organización Industrial
 
Pdf internet
Pdf internetPdf internet
Pdf internet
honoris_rusmila
 
Eada Spirit 06
Eada Spirit 06Eada Spirit 06
Eada Spirit 06
EADA
 
Demo curso-tcp-ip
Demo curso-tcp-ipDemo curso-tcp-ip
Demo curso-tcp-ip
CarlosRPC
 
El argentino n# 2633 10 5-121
El argentino n# 2633 10 5-121El argentino n# 2633 10 5-121
El argentino n# 2633 10 5-121
diarioelargentino
 
Ec4333 Lecture 1
Ec4333 Lecture 1Ec4333 Lecture 1
Ec4333 Lecture 1
Stephen Kinsella
 
Canciiones
CanciionesCanciiones
Canciiones
Amy Molina
 
Office365 y la productidad en la nube
Office365 y la productidad en la nubeOffice365 y la productidad en la nube
Office365 y la productidad en la nube
www.encamina.com
 
Ausstellung Lichtfeld 7 Presseinformation
Ausstellung Lichtfeld 7 PresseinformationAusstellung Lichtfeld 7 Presseinformation
Ausstellung Lichtfeld 7 Presseinformation
Patrik Tschudin
 
Ict executive summary template
Ict   executive summary templateIct   executive summary template
Ict executive summary template
Ivy Capital Technologies
 
Acervo bibliotecologia escalas_escala_de_likert
Acervo bibliotecologia escalas_escala_de_likertAcervo bibliotecologia escalas_escala_de_likert
Acervo bibliotecologia escalas_escala_de_likert
Helel Larea
 
Viacom
ViacomViacom
Viacom
Fergolin
 
Sustainability Drinks #18 - Volksentscheid Fahrrad
Sustainability Drinks #18 - Volksentscheid FahrradSustainability Drinks #18 - Volksentscheid Fahrrad
Sustainability Drinks #18 - Volksentscheid Fahrrad
GreenBuzz Berlin
 
arysahulatbazar
arysahulatbazararysahulatbazar
arysahulatbazar
Amin Lalani
 
Vr ma - MM - LMS 59
Vr ma - MM - LMS 59Vr ma - MM - LMS 59
Vr ma - MM - LMS 59
Stripovi Klub
 

Viewers also liked (20)

Ceam conferecia taller 12 nov 2010 errores bmix
Ceam conferecia taller 12 nov 2010 errores bmixCeam conferecia taller 12 nov 2010 errores bmix
Ceam conferecia taller 12 nov 2010 errores bmix
 
Look to you spanish
Look to you   spanishLook to you   spanish
Look to you spanish
 
Paula Menna Barreto Hall
Paula Menna Barreto HallPaula Menna Barreto Hall
Paula Menna Barreto Hall
 
Infecciones respiratorias virales
Infecciones respiratorias viralesInfecciones respiratorias virales
Infecciones respiratorias virales
 
Alberto rubio sanchez, rousseau
Alberto rubio sanchez, rousseauAlberto rubio sanchez, rousseau
Alberto rubio sanchez, rousseau
 
De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...
De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...
De la ocupación a la cooperativa: el proceso de recuperación de empresas en l...
 
Pdf internet
Pdf internetPdf internet
Pdf internet
 
Eada Spirit 06
Eada Spirit 06Eada Spirit 06
Eada Spirit 06
 
Demo curso-tcp-ip
Demo curso-tcp-ipDemo curso-tcp-ip
Demo curso-tcp-ip
 
El argentino n# 2633 10 5-121
El argentino n# 2633 10 5-121El argentino n# 2633 10 5-121
El argentino n# 2633 10 5-121
 
Ec4333 Lecture 1
Ec4333 Lecture 1Ec4333 Lecture 1
Ec4333 Lecture 1
 
Canciiones
CanciionesCanciiones
Canciiones
 
Office365 y la productidad en la nube
Office365 y la productidad en la nubeOffice365 y la productidad en la nube
Office365 y la productidad en la nube
 
Ausstellung Lichtfeld 7 Presseinformation
Ausstellung Lichtfeld 7 PresseinformationAusstellung Lichtfeld 7 Presseinformation
Ausstellung Lichtfeld 7 Presseinformation
 
Ict executive summary template
Ict   executive summary templateIct   executive summary template
Ict executive summary template
 
Acervo bibliotecologia escalas_escala_de_likert
Acervo bibliotecologia escalas_escala_de_likertAcervo bibliotecologia escalas_escala_de_likert
Acervo bibliotecologia escalas_escala_de_likert
 
Viacom
ViacomViacom
Viacom
 
Sustainability Drinks #18 - Volksentscheid Fahrrad
Sustainability Drinks #18 - Volksentscheid FahrradSustainability Drinks #18 - Volksentscheid Fahrrad
Sustainability Drinks #18 - Volksentscheid Fahrrad
 
arysahulatbazar
arysahulatbazararysahulatbazar
arysahulatbazar
 
Vr ma - MM - LMS 59
Vr ma - MM - LMS 59Vr ma - MM - LMS 59
Vr ma - MM - LMS 59
 

Similar to Hinkmond's JavaFX Mobile Dojo

Complete Solution for JavaFX Development - NexSoftSys
Complete Solution for JavaFX Development - NexSoftSysComplete Solution for JavaFX Development - NexSoftSys
Complete Solution for JavaFX Development - NexSoftSys
NexSoftsys
 
JavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development PlatformJavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development Platform
Praveen Srivastava
 
Java keynote preso
Java keynote presoJava keynote preso
Java keynote preso
Artur Alves
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
ph7 -
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
Alexander Casall
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
Java Intro
Java IntroJava Intro
Java Intro
Nazmul Hasan Rupok
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
Nitish Baranwal
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
mlakshumaiah
 
Presentation on Java Basic
Presentation on Java BasicPresentation on Java Basic
Presentation on Java Basic
Rustamji Institute of Technology
 
JavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaFX 8 everywhere; write once run anywhere by Mohamed TamanJavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaDayUA
 
Great cup of java
Great  cup of javaGreat  cup of java
Great cup of java
CIB Egypt
 
The Brainify App - JavaFx
The Brainify App - JavaFxThe Brainify App - JavaFx
The Brainify App - JavaFx
Mohd Shamweel
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
rajivmordani
 
Mobile Java
Mobile JavaMobile Java
Mobile Java
Nikita Makarov
 
Java fx
Java fxJava fx
Java fx
Apsara G
 
Core Java-1 (1).pdf
Core Java-1 (1).pdfCore Java-1 (1).pdf
Core Java-1 (1).pdf
HaskellKohler1234
 
Netbeans
NetbeansNetbeans
Netbeans
acosdt
 
What is java fx?
What is java fx?What is java fx?
What is java fx?
kanchanmahajan23
 
Javafx
JavafxJavafx
Javafx
Rahul karan
 

Similar to Hinkmond's JavaFX Mobile Dojo (20)

Complete Solution for JavaFX Development - NexSoftSys
Complete Solution for JavaFX Development - NexSoftSysComplete Solution for JavaFX Development - NexSoftSys
Complete Solution for JavaFX Development - NexSoftSys
 
JavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development PlatformJavaFX: A Rich Internet Application (RIA) Development Platform
JavaFX: A Rich Internet Application (RIA) Development Platform
 
Java keynote preso
Java keynote presoJava keynote preso
Java keynote preso
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
Java Intro
Java IntroJava Intro
Java Intro
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
 
Presentation on Java Basic
Presentation on Java BasicPresentation on Java Basic
Presentation on Java Basic
 
JavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaFX 8 everywhere; write once run anywhere by Mohamed TamanJavaFX 8 everywhere; write once run anywhere by Mohamed Taman
JavaFX 8 everywhere; write once run anywhere by Mohamed Taman
 
Great cup of java
Great  cup of javaGreat  cup of java
Great cup of java
 
The Brainify App - JavaFx
The Brainify App - JavaFxThe Brainify App - JavaFx
The Brainify App - JavaFx
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
Mobile Java
Mobile JavaMobile Java
Mobile Java
 
Java fx
Java fxJava fx
Java fx
 
Core Java-1 (1).pdf
Core Java-1 (1).pdfCore Java-1 (1).pdf
Core Java-1 (1).pdf
 
Netbeans
NetbeansNetbeans
Netbeans
 
What is java fx?
What is java fx?What is java fx?
What is java fx?
 
Javafx
JavafxJavafx
Javafx
 

More from Stephen Chin

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
Stephen Chin
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
Stephen Chin
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
Stephen Chin
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
Stephen Chin
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
Stephen Chin
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
Stephen Chin
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
Stephen Chin
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
Stephen Chin
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
Stephen Chin
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)
Stephen Chin
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile Methodologist
Stephen Chin
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
Stephen Chin
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
Stephen Chin
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java Workshop
Stephen Chin
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
Stephen Chin
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
Stephen Chin
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
Stephen Chin
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
Stephen Chin
 
DukeScript
DukeScriptDukeScript
DukeScript
Stephen Chin
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
Stephen Chin
 

More from Stephen Chin (20)

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile Methodologist
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
 
JCrete Embedded Java Workshop
JCrete Embedded Java WorkshopJCrete Embedded Java Workshop
JCrete Embedded Java Workshop
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
Java on Raspberry Pi Lab
Java on Raspberry Pi LabJava on Raspberry Pi Lab
Java on Raspberry Pi Lab
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
DukeScript
DukeScriptDukeScript
DukeScript
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 

Recently uploaded

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Hinkmond's JavaFX Mobile Dojo

  • 1. SVJFXUG – JavaFX Mobile Dojo February 10, 2010 Hinkmond Wong Senior Staff Engineer Sun Oracle 1
  • 2. Agenda Introduction End-to-end deployment: Moving JavaFX apps from Desktop to Mobile JavaFX Mobile Do's and Dont's Java ME integration: Co-mingling JavaFX code with Java ME Demo: JavaFX Mobile running on cool devices Q&A 2
  • 3. Agenda Introduction End-to-end deployment: Moving JavaFX apps from Desktop to Mobile JavaFX Mobile Do's and Dont's Java ME integration: Co-mingling JavaFX code with Java ME Demo: JavaFX Mobile running on cool devices 3
  • 4. JavaFX: Simple, Declarative Scripting Language class HelloWorld { var message : String; function print() { println(message); } } var name = "Jan"; var hello = HelloWorld { message: bind "Hello {name}!" } hello.print(); // prints Hello Jan! name = "Brian"; hello.print(); // prints Hello Brian! 4
  • 5. JavaFX Scenegraph Tree-like structure of graphical nodes Easy way of vector graphics representation Scene { Group { javafx.scene.shape Rectangle, Rectangle Circle } } javafx.scene.shape Circle 5
  • 6. JavaFX Block Diagram JavaFX Applications and Services JavaFX Apps Framework Authoring Tools JavaFX JavaFX JavaFX Desktop Mobile TV Developer Runtime Runtime Runtime Tools (IDE Plug ins, RAD, Production Suite) Desktop Mobile TV Extensions Extensions Extensions Designer Tools JavaFX Common Profile (Authoring, Publishing, Media Encoding) Java Platform (Java Plug in) 6
  • 7. JavaFX Common Profile Features Components Features Compiler and Languages SE 5 and CLDC Target Geometric shapes, lines, Clip with arbitrary geometric shapes curves, arc Image masks Graphics Transparency Fullscreen support Gradient, color fill, texture transforms (rotate, scale skew) Stroke styles True Type font rendering Text Transforms (rotate, scale, skew) Content embedded font 7
  • 8. JavaFX Common Profile Features Components Features Key frame animation Standard animations Animation with tweening (rotate, zoom, slide) Path-based animation Cross platform audio (mp3) Volume and audio balance control and video (On2) Media Codec native media framework support (DirectShow and Core Video), play, pause, seek, volume, balance, speed controls Web services (JSON/XML parser, RESTful APIs) Other Common text input control (CSS skinning) Input handling (keyboard, mouse, touch, etc.) 8
  • 9. JavaFX Developer Tool Chain Media Assets Assets Integrated Emulated By Created By Transformed By Into IDEs (If Required) Adobe Illustrator JavaFX Plug-in Adobe for IDEs Photoshop JavaFX JavaFX Production Mobile Suite JavaFX Emulator On2 Flix Compiler Encoders (JavaFX File Format, VP6 and MP3) Adobe CS3 (Flash and 3rd Party Flash Video, JavaFX 1.5) RAD Tool 9
  • 10. JavaFX Plugin for NetBeans 10
  • 11. Incorporate Existing Visual Assets with JavaFX Production Suite 11
  • 12. JavaFX Script class HelloWorld { var message : String; function print() { println(message); } } var name = "Jan"; var hello = HelloWorld { message: bind "Hello {name}!" } hello.print(); // prints Hello Jan! name = "Brian"; hello.print(); // prints Hello Brian! 12
  • 13. Mobile vs. Desktop k top on es mm ile D Co Mob Common profile Most of JavaFX is "common" Different implementations Platform specific APIs Performance Capabilities 13
  • 14. High level architecture Java FX Application JavaFX Application Runtime JavaFX Language Runtime SJWC: CLDC + MIDP + MSA Application deployed as MIDlet Full access to all JavaFX and device features Language runtime is common for all profiles 14
  • 15. JavaFX Mobile Architecture JavaFX Runtime (Common API, SceneGraph, Media, Webservices) Sun Java Wireless Client (CLDC, MIDP 2.0, JSR 135) Software OpenVG OpenGL-ES Renderer Mobile Device Default Stack 2D Accelerated Stack 3D Accelerated Stack 15
  • 16. JavaFX Mobile - Packaging JavaFX Java code code JavaFX compiler Java compiler Pre-verification Optionally bundled with Static code analysis JAR JavaFX Platform Runtime performance and size (CLDC ready code) optimizations 16
  • 17. Agenda Introduction End-to-end deployment: Moving JavaFX apps from Desktop to Mobile JavaFX Mobile Do's and Dont's Java ME integration: Co-mingling JavaFX code with Java ME Demo: JavaFX Mobile running on cool devices 17
  • 18. Moving JavaFX from Desktop to Mobile Josh Marinacci's Tech Tip http://javafx.com/docs/techtips/mobile_sample/ Program only in Common Profile No use of Swing No use of Effects javafx.scene.effect No direct Java API calls Keep screen size and orientation changeable Allow for different Input Methods Keyboard vs. Touch Screen/Stylus Keep in mind performance differences Keep in mind graphics capabilities 18
  • 19. Moving JavaFX from Desktop to Mobile Desktop: Perspective Transform Mouse clicks trigger action Mobile: No tricky transforms, Touch- based or cursor key trigger action, screen size sensitive 19
  • 20. Agenda Introduction End-to-end deployment: Moving JavaFX apps from Desktop to Mobile JavaFX Mobile Do's and Dont's Java ME integration: Co-mingling JavaFX code with Java ME Demo: JavaFX Mobile running on cool devices 20
  • 21. JavaFX Mobile Do's and Don'ts Do complex graphics off-line Fancy graphics can be pre-rendered Add dynamic content (ex. text) at runtime 21
  • 22. JavaFX Mobile Do's and Don'ts Michael Heinrichs' Mobile Best Practices: http://java.sun.com/developer/technicalArticles/javafx/mobile Avoid unnecessary bindings Keep the scenegraph small Use simple shapes instead of images Use pre-scaling Use background loading Use Integer instead of Number Use functions of class Sequences 22
  • 23. Agenda Introduction End-to-end deployment: Moving JavaFX apps from Desktop to Mobile JavaFX Mobile Do's and Dont's Java ME integration: Co-mingling JavaFX code with Java ME Demo: JavaFX Mobile running on cool devices 23
  • 24. Java ME integration: Co-mingling JavaFX code with Java ME Will tie JavaFX app to Java ME platform (no cross- screen compatibility) Access JSRs (optional functionality) on mobile devices Bluetooth GPS SMS text messaging etc. One-way calls: JavaFX calling Java ME APIs Use def whenever possible Use Functions Outside Class 24
  • 25. Java ME integration: Co-mingling JavaFX code with Java ME import javax.microedition.*; ... def socket = Connector.open("socket://localhost: 10001"); def sc = socket as javax.microedition.io.SocketConnection ; def is = sc.openInputStream() as InputStream; def os = sc.openOutputStream() as OutputStream; 25
  • 26. Java ME integration: Co-mingling JavaFX code with Java ME os.write(("connect:").getBytes()); os.flush(); os.write(("update:").getBytes()); os.flush(); os.close(); sc.close(); 26
  • 27. Co-mingling Bind of UI to the Controller Java ME MIDP contains existing functionality (Controller) event code Use of Bind in JavaFX Link attributes, so when one changes other automatic changes happen Triggering from input events Bind JavaFX UI events to call MIDP code Using data from MIDP JavaFX objects hold onto MIDP data to pass to MIDP when bind events occur 27
  • 28. Co-mingling Bind UI to the Controller Animations Graphics Events Transitions 28
  • 29. Co-mingling Bind of UI to the Controller Example of Bind from JavaFX to MIDP: Label { text: bind data.value } operation getCountFromMIDP( ) { ... // Use MIDP Java ME calls to get data } 29
  • 30. Co-mingling JavaFX UI Event to Java ME var zipCodeText: TextBox = TextBox { blocksMouse: true columns: 7 selectOnFocus: false text: "95054" onKeyPressed:function(e:KeyEvent) { if(e.code == KeyCode.VK_ENTER) { // Call Java ME APIs here // Ex. Get location-based services // ... } } 30
  • 32. Q&A February 10, 2010 Hinkmond Wong Senior Staff Engineer Sun Oracle 32
  • 33. SVJFXUG – JavaFX Mobile Dojo February 10, 2010 Hinkmond Wong Senior Staff Engineer Sun Oracle 33