Presentasi Java Fx

download Presentasi Java Fx

If you can't read please download the document

Transcript of Presentasi Java Fx

  • 1. Pengenalan JavaFX
    • Andik Nur Achmad

Sun Campus Ambassador [email_address] http://andique.wordpress.com 2. Arsitektur JavaFX Apa itu JavaFX? Agenda JavaFX Script Selanjutnya ... JavaFX Demo! 3. Pengenalan: Apa itu JavaFX? 4. Bagaimana aplikasi internet saat ini? 5. Rich Internet Application (RIA) 6. Perkembangan Rich Internet Application (RIA) 7. Apa yang bisa kitabuat dengan JavaFX?

  • Video playback
  • Aplikasi bisnis yang interaktif
  • Mash-up dengan web service berbasis REST
  • Dan,
  • Aplikasi yang bisa berjalan di desktop, browser, mobile, dan tv

8. Arsitektur JavaFX 9. Developer's Point of View 10. Designer's Point of View 11. Consumer's Point of View 12. Kompetitor 13. Scene Shape

  • javafx.scene.shape
    • Ellipse
    • Polyline
    • Arc
    • Path
    • ShapeSubtract
    • QuadCurve
    • DelegateShape
    • ClosePath
    • CubicCurve
    • Shape
    • LineTo
    • SVGPath
    • Polygon
    • Line
    • Circle
    • ArcTo
    • PathElement
    • HlineTo
    • VlineTo
    • CurveTo
    • QuadTo
    • ShapeIntersect
    • MoveTo
    • Rectangle

14. Circle

  • importjavafx.scene.geometry.*;
  • importjavafx.scene.paint.*;
  • Circle {
  • centerX: 100
  • centerY: 100
  • radius: 50
  • fill: Color.BLACK
  • }

15. Rectangle

  • importjavafx.scene.geometry.*;
  • importjavafx.scene.paint.*;
  • Rectangle {
  • x: 50
  • y: 50
  • width: 200
  • height: 100
  • arcWidth: 20
  • arcHeight: 20
  • fill: Color.BLACK
  • }

16. Ellipse

  • importjavafx.scene.geometry.*;
  • importjavafx.scene.paint.*;
  • Ellipse {
  • centerX: 50
  • centerY: 50
  • radiusX: 50
  • radiusY: 25
  • fill: Color.BLACK
  • }

17. ShapeIntersect

  • importjavafx.scene.geometry.*;
  • importjavafx.scene.paint.*;
  • ShapeIntersect {
  • fill: Color.BLACK
  • a: Rectangle { width: 100 height: 50 }
  • b: Ellipse {
  • centerX: 100
  • centerY: 25
  • radiusX: 50
  • radiusY: 25
  • }
  • }

18. ShapeSubtract

  • importjavafx.scene.geometry.*;
  • importjavafx.scene.paint.*;
  • ShapeSubtract {
  • fill: Color.BLACK
  • a: Rectangle { width: 100 height: 50 }
  • b: Ellipse {
  • centerX: 100
  • centerY: 25
  • radiusX: 50
  • radiusY: 25
  • }
  • }

19. Animation Framework

  • javafx.animation
    • Interpolatable
    • Interpolator
    • KeyFrame
    • KeyValue
    • SimpleInterpolator
    • Timeline

20. JavaFX Script Language

  • Declarative syntax
    • GUI
    • Swing
    • Data binding
  • Statically typed
    • and code structuring, reuse, and encapsulation features that enable creating and maintaining very large programs in the Java programming language.

21. Script

  • Sebuah script" satu atau lebih deklarasi atau ekspresi
  • importjava.lang.System;
  • var ten : Integer = 10;
  • System.out.println("Twice {ten} is {2 * ten}.");
  • // Twice 10 is 20.

22. Class

  • classKnight {
  • attributehealth= 100;
  • attributestrength = 10;
  • functiondie(){
  • health = 0
  • }
  • functionhurt(amount: Integer){
  • strength -= amount
  • }
  • }

23. Objects

  • varmyKnight = Knight {}
  • varsuperKnight = Knight {
  • health: 150;
  • strength: 15;
  • }
  • myKnight.hurt(superKnight.strength);
  • // myKight.health = 85

24. Basic Data Types

  • JavaFX
    • String
    • Boolean
    • Number
    • Integer
    • Duration
  • Java
    • java.lang.String
    • java.lang.Boolean
    • java.lang.Number
    • byte, short, int, long, BigInteger
    • N/A

25. String Examples

  • vars1 = "Java";
  • vars2 = "FX";
  • vars3 = "Java{s2}";// s3 ="JavaFX"
  • vars4 = "{s1}{s2}";// s4 = "JavaFX"

26. Boolean Examples

  • varcool = true;
  • vars = "Java{ if (cool)"FX" else "Script"}";
  • //s = "JavaFX"
  • vara = true;// a = true
  • varb = false;// b = false
  • varc = aandb;// c = false
  • vard = aorb;// d = true
  • vare =nota;// e = false

27. Duration Examples

  • vart1 = 5ms; // 5 milliseconds
  • vart2 = 10s; // 10 seconds
  • vart3 = 30m; // 30 minutes
  • vart4 = 1h;// 1 hour
  • vart5 = t1 + t2 + t3 + t4;
  • // 1 hour 30 min 10 secs and 5 millisecs

28. Sequences Examples

  • varx = [1,2,3];
  • // array initialization
  • insert10intox;
  • // [1, 2, 3, 10]
  • insert12beforex[1];
  • // [1, 12, 2, 3, 10]
  • delete12fromx;
  • // [1, 2, 3, 10]
  • insert[1..10]intox;
  • // [1, 2, 3, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

29. demo 30.

  • Download Java FX & IDE Plugins untuk Netbeans or Eclipse
  • Bergabung dengan OpenJFX Java.net Project
  • Belajar dari Java FX Tutorials
  • Berpartisipasi dalam Java FX Forums

http://openjfx.dev.java.net Java FX Selanjut-nya 31. JavaFX Resources

  • Java FX Project Site:http://openjfx.dev.java.net
    • Java.net: Download early versions of Java FX
    • IDE Plugins, Tutorials, Forums, FAQs
    • Getting Started With the JavaFX Script Language
    • JavaFX Script 2D Graphics Tutorial
    • The JavaFX Script Programming Language Reference
  • Planet FX Wiki:http://jfx.wikia.com/wiki/Main_Page
    • Open-source documentation site for Java FX
  • Chris Oliver's Blog:http://blogs.sun.com/chrisoliver/
    • Latest news, other informal information
    • Source code for lots of demos (Space Invaders, Calculator)
  • Sun's Java FX Site:
    • http://www.sun.com/software/javafx/
    • http://www.javafx.com

32. JavaFX Resources

  • Free online course at http://www.javapassion.com/

33. Terima Kasih

  • Andik Nur Achmad

Original slide by Silveira Neto Sun Campus Ambassador [email_address] http://andique.wordpress.com