getting started with widgetfx - oracle cloud · getting started with widgetfx open-source desktop...
TRANSCRIPT
Getting Started with WidgetFXOpen-Source Desktop Widget Platform with JavaFX™ Technology
Stephen ChinInovis, Inc.
Joshua MarinacciSun Microsystems
1Monday, 8 June 2009
The JavaFX Desktop Widget Platform
WidgetFX
2Monday, 8 June 2009
Meet the Presenters…
Steve Josh
3
Motorc
Family
Family
World
3Monday, 8 June 2009
WidgetFX Origins
4
4Monday, 8 June 2009
5
Why another desktop widget framework?
> Open-Sourcel But widgets can be licensed commercially
> Cross-Platform Supportl Windows XP/Vista, Linux, and Mac OS X.
> One-Click Installationl Plus automatic updates of the dock and widgets.
> Robust Securityl Secure sandbox + signed widgets
5Monday, 8 June 2009
Built-in Widgets
> Clockl Skinnable via CSS
> Slide Showl Configurable Directory, Speed, & Filter
> Web Feedl Supports Atom and all RSS flavors
6Monday, 8 June 2009
Dock Features
> Drag to desktop> Resize widgets (option for fixed aspect ratio)> Per widget transparency> Widget settings saved on restart> Toggle dock always-on-top> Launch on start-up> Multi-monitor support> Dock and widgets can be styled via CSS
7Monday, 8 June 2009
Movie Widget Tutorial
8Monday, 8 June 2009
Widget PropertiesName Type Inherited From Description
width Number Resizable Initial width of the widget
height Number Resizable Initial height of the widget
aspectRatio Number Widget If set, defines a fixed aspect ratio for the widget width and heightskin Skin Control Renders the widget to the scene graph, can have CSS properties for styling
9Monday, 8 June 2009
Widget Definition
var widget: Widget;widget = Widget { width: 640 height: 352 aspectRatio: bind player.media.width / player.media.height skin: Skin { scene: Group { content: bind player } }}
10Monday, 8 June 2009
Load the Media
var source = "http://projavafx.com/movies/elephants-dream-640x352.flv";
var player = bind SimpleMoviePlayer { media: Media { source: source } width: bind widget.width height: bind widget.height}
11Monday, 8 June 2009
Run as Application
12Monday, 8 June 2009
Run in Widget Runner
13Monday, 8 June 2009
How the Widget Runner Works
> Test widgets standalone> Identical behavior to production> Two ways to launch:
l Automatic Executionl Run your widget as a Web Start application
l Direct Executionl Create a launch url with the following structure:
http://widgetfx.org/dock/runner.jnlp?arg=<widgetUrl>
14Monday, 8 June 2009
Widget Configuration PropertiesClass Name Type Description
BooleanProperty Boolean This class allows you to persist sequences of Booleans
BooleanSequenceProperty Boolean[] This class allows you to persist sequences of Booleans
IntegerProperty Integer This class allows you to persist Integers
IntegerSequenceProperty Integer[] This class allows you to persist sequences of Integers
LongProperty Long This class allows you to persist Longs
LongSequenceProperty Long[] This class allows you to persist sequences of Longs
NumberProperty Number This class allows you to persist Numbers
NumberSequenceProperty Number[] This class allows you to persist sequences of Numbers
StringProperty String This class allows you to persist Strings
StringSequenceProperty String[] This class allows you to persist sequences of Strings
15Monday, 8 June 2009
Widget Configuration
widget = Widget { ... configuration: Configuration { properties: [ StringProperty { name: "source" value: bind source with inverse } ] scene: Scene {} // defined in the next code fragment }}
16Monday, 8 June 2009
Widget Config Dialog
scene: Scene { content: Grid { rows: row([ Text { content: "Source URL:“ }, TextBox { columns: 30, value: bind source with inverse } ]) }}
17Monday, 8 June 2009
Add an On-Replace Trigger (fixme)
var player = bind SimpleMoviePlayer { media: Media { source: source } width: bind widget.width height: bind widget.height} on replace =oldPlayer { oldPlayer.player.stop();}
18Monday, 8 June 2009
Widget Configuration (demo)
19Monday, 8 June 2009
Community Written Widgets
> Disk Spacel Pär Dahlberg
> World Clockl Ludovic Hochet
> World Smiley Widgetl Enrique Ceja
> Weather Widgetl Larry Dickson
20Monday, 8 June 2009
The Pac-Man Challenge!
> “I Wish... Henry Zhang would make a WidgetFX widget from his JavaFX Pac-Man game”
-- Jim Weaver
21
javafxpert.com
21Monday, 8 June 2009
The Pac-Man Challenge!
> With about one week to go, I think it is interesting and fun to give it a try.
… After adjusting the width and height, it
was just simply working! (see the image on the [right])
-- Henry Zhang
22
javafxgame.com
22Monday, 8 June 2009
23
So What is With the Bunny?
23Monday, 8 June 2009
Meet Nabaztag
> Wifi-Enabled Rabbit> 4 Multi-Colored LEDs> Rotating Ears> Text to Speech Conversion> Audio Sensor for Command Input> REST API for Interactions
24
24Monday, 8 June 2009
Nabaztag Widget
> Widget Functionality:l Send Messages Using Text-to-Speechl Move the Earsl Send a Choreographyl Play an Audio Stream
25
25Monday, 8 June 2009
Nabaztag API
> REST call for sending messages:l http://api.nabaztag.com/vl/FR/api.jsp?
sn=0013D3862711&token=1242371191&tts=Hello+JavaOne
> REST call for repositioning ears:l http://api.nabaztag.com/vl/FR/api.jsp?
sn=0013D3862711&token=1242371191&posleft=4&posright=5
26
26Monday, 8 June 2009
Nabaztag Code & Demo
27
27Monday, 8 June 2009
What Else You Can Do With a Rabbit?
> E-mail notification> Continuous build status> Ambient Twitter chat> Play podcasts
(Java Posse anyone?)> Scare away unwanted guests> Tell your wife you are busy working on the
WidgetFX 1.2 release and are going to be late… again
28
28Monday, 8 June 2009
WidgetFX Future Roadmap
> WidgetFX 1.2 Releasel JavaFX 1.2 Supportl Improved Performancel Release on or before 6/15
> Mobile WidgetFXl Deploy widgets to a phone right from the desktopl Mobile widget dockl Planned for second half of 2009
29
29Monday, 8 June 2009
Widget Development Contest
> Sign up at http://widgetfx.org/
30
30Monday, 8 June 2009
Contest Details> How to Enter:
1. Download the WidgetFX 1.2 SDK2. Develop a desktop widget that runs in WidgetFX3. Submit your widget to the Widget Library
> Prizes:1. 12 free e-books, one a month for a year2. 3 free e-books3. 1 free e-book
31
31Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
32Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
5. You need a reason to test out that shiny new pen from the Pavilion
32Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
5. You need a reason to test out that shiny new pen from the Pavilion
4. It is a great way to stretch your muscles after typing on your laptop the whole session
32Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
5. You need a reason to test out that shiny new pen from the Pavilion
4. It is a great way to stretch your muscles after typing on your laptop the whole session
3. You couldn’t say no to the usher at the door either…
32Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
5. You need a reason to test out that shiny new pen from the Pavilion
4. It is a great way to stretch your muscles after typing on your laptop the whole session
3. You couldn’t say no to the usher at the door either…
2. You thought the presentation was awesome! (feel free to step up and take a second survey)
32Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
5. You need a reason to test out that shiny new pen from the Pavilion
4. It is a great way to stretch your muscles after typing on your laptop the whole session
3. You couldn’t say no to the usher at the door either…
2. You thought the presentation was awesome! (feel free to step up and take a second survey)
1. Help keep Josh employed at Sun!
32Monday, 8 June 2009
Top 5 reasons to fill out the survey…
32
5. You need a reason to test out that shiny new pen from the Pavilion
4. It is a great way to stretch your muscles after typing on your laptop the whole session
3. You couldn’t say no to the usher at the door either…
2. You thought the presentation was awesome! (feel free to step up and take a second survey)
1. Help keep Josh employed at Sun!
32Monday, 8 June 2009
33
Stephen Chinhttp://steveonjava.com/Tweet: steveonjava
Joshua Marinaccihttp://weblogs.java.net/blog/joshy/Tweet: joshmarinacci
33Monday, 8 June 2009