JFXtras - JavaFX Controls, Layout, Services, and More
1. JFXtras
JavaFX Controls, Layouts, Services, and More
Stephen Chin Dean Iverson
GXS Virginia Tech Transportation Institute
steve@widgetfx.org deanriverson@gmail.com
tweet: @steveonjava tweet: @deanriverson
2. Meet the Presenters…
Steve Dean
Family Man
Family Man
Motorcyclist
Robotics
Coach
2
3. Agenda
> JFXtras 0.7 Summary
> JavaFX 2.0 Recap
> The Future of JFXtras
> A Little Announcement…
3
18. Sphere Challenge
Andres Almiray’s Weblog
http://www.jroller.com/aalmiray/entry/griffon_gfxbuilder_fxbuilder_side_by
“The following snapshot shows a couple of
spheres drawn with GfxBuilder and
FxBuilder, can you guess which one is
which?
…
This is by no means a post to bash JavaFX
rather to point out some of its deficiencies”
-- Andres Almiray
(taken completely out of context)
18
19. Sphere Challenge – JavaFX Response
> Composition:
RadialGradient for the Sphere
Three additional RadialGradients for
the light sources
A blurred shadow underneath
> Features:
All Bound/Relative Coordinates
Configurable –
Base, Ambient, Specular, Shine Colors
Shadow Size and Height
Uses New JFXtras ColorUtil Library
JavaFX Caching for High Performance
19
25. XPicker
> Multiple Picker Types
Side Scroll
Drop Down
Thumb Wheel
Side/Thumb Nudge
> Supports All Events
Mouse Clicks
Mouse Wheel
Keyboard
25
26. XCalendarPicker
> Configurable Locale
> Multiple Selection Modes
Single
Multiple
Range
> Completely Skinnable
26
27. XShelfView
> High Performance
> Features:
Scrollbar
Image Title
Reflection Effect
Aspect Ratio
Infinite Repeat
> Integrates With JFXtras Data Providers
> Automatically Updates on Model Changes
27
28. XTableView
> Insanely Scalable
Up to 16 million rows
> Extreme Performance
Pools rendered nodes
Caches images
Optimized scene graph
> Features:
Drag-and-Drop Column Reordering
Dynamic Updating from Model
Automatically Populates Column Headers
28
29. BandMatesFX - JSONHandler in 3 Steps
public class FreebaseResult {
public var code: String;
1 public var result: Result;
public var status: String;
POJO public var transactionId: String;
}
var albumHandler:JSONHandler = JSONHandler {
2 rootClass: "javafxpert.FreebaseResult“
onDone: function(obj, isSequence): Void {
JSONHandler freebaseResult = obj as FreebaseResult;
}}
req = HttpRequest {
3 location: queryUrl
onInput: function(is: java.io.InputStream) {
HttpRequest albumHandler.parse(is);
}}
29
31. JavaFX 2.0 Recap
> The Good
JavaFX is here to stay
Controls will be open source
Calling JavaFX code from different language is
pretty cool!
> The Bad
We have to wait a bit… (next summer)
Mobile is no longer on the radar
> The Ugly
JavaFX Script was a pretty nice language…
31
32. The Future of JFXtras
> Mission:
Provide Quality JavaFX Add-ons
> Going Forward:
Migrate Non-Overlapping Functionality
Support Java APIs For All Components
Continue to Fill the Gaps
> Reality:
Migration Will Be Challenging
Release Dates Will Trail Oracle
(until they are fully open source)
32
33. How about JavaFX on… Java
public class HelloStage implements Runnable {
public void run() {
Stage stage = new Stage();
stage.setTitle("Hello Stage");
stage.setWidth(600);
stage.setHeight(450);
Scene scene = new Scene();
scene.setFill(Color.LIGHTGREEN);
stage.setScene(scene);
stage.setVisible(true);
}
public static void main(String[] args) {
FX.start(new HelloStage());
}
}
38. Announcing Project Visage
> “Visage is a domain specific language (DSL)
designed for the express purpose of writing
user interfaces.”
> Visage project goals:
Compile to JavaFX Java APIs
Evolve the Language (Annotations, Maps, etc.)
Support Other Toolkits
> Come join the team!
> For more info: http://visage-lang.org/
38
39. Stephen Chin Dean Iverson
steve@widgetfx.org deanriverson@gmail.com
tweet: @steveonjava tweet: @deanriverson
39