• Share
  • Email
  • Embed
  • Like
  • Private Content
JJUG-Whats-New-For-JavaFX-in-JDK8
 

JJUG-Whats-New-For-JavaFX-in-JDK8

on

  • 8,832 views

 

Statistics

Views

Total Views
8,832
Views on SlideShare
4,813
Embed Views
4,019

Actions

Likes
8
Downloads
66
Comments
0

9 Embeds 4,019

http://yoshio3.com 3720
http://makopi23.blog.fc2.com 151
https://twitter.com 120
http://admin.blog.fc2.com 15
http://cache.yahoofs.jp 4
http://webcache.googleusercontent.com 3
https://yoshio3.com 3
http://translate.googleusercontent.com 2
http://cloud.feedly.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    JJUG-Whats-New-For-JavaFX-in-JDK8 JJUG-Whats-New-For-JavaFX-in-JDK8 Presentation Transcript

    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 131New JavaFX Features in JDK 8(after a gentle intro to app development with JavaFX)Jim WeaverJava Technology AmbassadorOracle Corporation@JavaFXpertjames.weaver@oracle.com
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 132 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16ProgramAgenda Intro to app development with JavaFX– Obtaining JavaFX resources– Creating a user interface– Using Scene Builder and FXML New JavaFX Features in JDK 8– Some new Java features in JDK 8– New JavaFX Features in JDK 8
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 133 3Please noteThe following is intended to outline our general productdirection. It is intended for information purposes only, andmay not be incorporated into any contract. It is not acommitment to deliver any material, code, or functionality,and should not be relied upon in making purchasingdecisions. The development, release, and timing of anyfeatures or functionality described for Oracle’s productsremains at the sole discretion of Oracle.
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 134■ An API included in Java SE 7/8for UI development■ The successor to Java Swing■ Not the JavaFX Script language4JavaFX is:
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 135To Get JavaFX, Download Java 7
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 136To Develop JavaFX, Use Your Fav IDE
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 137 7Start Here: http://javafxcommunity.com
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 138 8Download JDK 8 Early Access Release
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 139Download Samples (e.g. Ensemble 8)http://jdk8.java.net/download.html9
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1310Ensemble in Mac App Store
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1311 11Get Pro JavaFX 2 Book ResourcesFirst chapter and all code samples availableat http://ProJavaFX2.com for free
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1312 12Visit Here: http://fxexperience.comTip: This site isauthored byOracle JavaFXEngineers, andoften containsnews about 3D
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1313Creating a User InterfaceThe MetronomeTransitionexample is in the Pro JavaFX 2code download
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1314Extend javafx.application.Application
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1315Override the Application start() Method
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1316Create a Scene
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1317Populate the Scene Graph
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1318Handle Events
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1319Call the Animation Methods
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1320Animate the Circle
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1321Bind UI Properties to Animation Status
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1322Setup and Show the Stage
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1323Some New Java Features in JDK 8■ Nashorn JavaScript Engine■ Date & Time API■ Bulk data operations for collections■ Lambda expressions and virtual extension methods23
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1324A Lambda Expression (Closure) is……a function that that may have parameters,an expression or block of code, optionallyreturning a value.24e -> anim.playFromStart()
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1325 25Event Handling w/Anon Inner ClassesAny interface that has exactly one abstract method is known as afunctional interface, and may be replaced by a lambda expression.
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1326 26Replace with Lambda ExpressionThe type of the lambda is inferred by the compiler asEventHandler<ActionEvent> because the onAction() methodtakes an object of type EventHandler<ActionEvent>.Because EventHandler has a single method handle() the lambdaexpression must be an implementation of the handle() method.
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1327 27Simplify the Lambda ExpressionThe parameter in this lambda expression must be anActionEvent, because that is the type specified by thehandle() method of the EventHandler interface.We can therefore simplify this lambda expressionbecause the parameter type is inferred.
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1328 28Lose the ParenthesesWhen a lambda expression has a single parameter andits type is inferred, the parentheses are not required
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1329 29Lose the BracesBecause the block of code in our lambda expressioncontains only one statement, we can lose the braces.
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1330 30MetronomeTransition w/Lambdas
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1331Blog Post with More Detailhttp://JavaFXpert.com/2013/02/mary-had-a-little-%CE%BB.html31
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1332New JavaFX Features in JDK 8■ New Modern Theme: Modena■ JavaFX 3D■ Rich Text■ TreeTableView■ DatePicker■ Public API for CSS structure■ WebView Enhancements■ Embedded Support32
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1333New Modern Theme: Modena33http://fxexperience.com/2013/03/modena-theme-update/
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1334“JavaFX 3D gives you the ability to use 3D geometry,cameras, and lights in JavaFX.”JavaFX 3D
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1335JavaFX 3D Application Example35http://fxexperience.com/2013/02/javafx-3d-early-access-available/
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1336Mesh Geometry (3D Shapes)■ Predefined shapes■ Box■ Cylinder■ Sphere■ User-defined shapes■ Using TriangleMesh / MeshView36https://wikis.oracle.com/display/OpenJDK/SphereAndBox.java
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1337 37Creating Primitive Shapes and Materials
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13383D Materials and Textures■ PhongMaterial has these properties■ Ambient color■ Diffuse color, diffuse map■ Specular color, specular map■ Specular power■ Normal map■ Self-illumination map38https://wikis.oracle.com/display/OpenJDK/3D+Features
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13393D Lights■ Lights are nodes in the scene graph■ PointLight■ AmbientLight■ Default light provided if no active lights39https://wikis.oracle.com/display/OpenJDK/3D+Features
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1340 40Lights, Camera, Action!Tip: The camera is a node in thescene graph, so it is moveable
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1341Rich Text■ Use Cases■ text editor ● code editor ● mixed style Labels, buttons, cells ●headings ● descriptions ● large textual content ● etc.■ Details■ TextFlow, a new layout container■ Text is just a node… so you can add effects, event handlers, andanimations■ You can also use CSS, FXML41https://wikis.oracle.com/display/OpenJDK/Rich+Text
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1342Rich Text Examples42
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1343TreeTableView■ Goal: reuse as many API, or API concepts, as possible from theTreeView and TableView controls API43https://wikis.oracle.com/display/OpenJDK/TreeTableView
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1344DatePicker44
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1345Public API for CSS structure■ CSS styling is one of the key features for JavaFX■ CSS has been implemented exclusively in private API(com.sun.javafx.css package)■ Tools (e.g. Scene Builder) require a CSS public API■ Developers will be able to define custom CSS styles45https://wikis.oracle.com/display/OpenJDK/CSS+API+to+support+custom+UI+Controls
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1346WebView Enhancements■ Nashorn JavaScript engine■ https://blogs.oracle.com/nashorn/entry/open_for_business■ WebSocket■ http://javafx-jira.kenai.com/browse/RT-14947■ Web Workers■ http://javafx-jira.kenai.com/browse/RT-978246
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1347Embedded Support■ JavaFX to be included in Oracle’s implementation of■ Java SE 8 (x86, x64, ARM)■ Java SE Embedded 8 (ARM)■ Java SE Embedded 8 will include a subset of the JavaFXfeatures to be released in the desktop version■ No WebView support■ No media support47
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1348RoadmapJavaFX20152013 2014JDK 8 (Q1 2014)• Lambda•JVM Convergence• JavaScript Interop• JavaFX 8– 3D API– Java SE Embedded support– Enhanced HTML5 support7uX• Java Flight Recorder in JDK• Native memory tracking• Java Discovery Protocol• App Store Packaging toolsJDK 9• Jigsaw• Interoperability• Optimizations• Cloud• Ease of Use• JavaFX JSRNetBeans IDE 7.3• New hints and refactoring• Scene Builder SupportNetBeans IDE 8• JDK 8 support• Scene Builder 2.0 supportScene Builder 2.0• JavaFX 8 support• Enhanced Java IDE supportNetBeans IDE 9• JDK 9 support• Scene Builder 3.0 supportSceneBuilder 3.0• JavaFX 9 supportApr CPU• Java ClientSecurityEnhancements2016JDK 8.1 (Q3 2014)• Deterministic G1• JMC 6• Improved JRE installer• App bundlingenhancementsJDK 8.2Scene Builder 1.1• Linux support
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1349Call to Action■ Download and play with JDK 8 / JavaFX 8 features■ Share your experiences with JavaFX community by bloggingand tweeting #JavaFX■ Send me james.weaver@oracle.com an RSS feed to the JavaFXcategory of your blog so I can include your posts onhttp://javafxcommunity.com49
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1350Questions?
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1351New JavaFX Features in JDK 8(after a gentle intro to app development with JavaFX)Jim WeaverJava Technology AmbassadorOracle Corporation@JavaFXpertjames.weaver@oracle.com
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1352