JavaFX and WidgetFX at SVCodeCamp

  • 2,741 views
Uploaded on

These are the slides from my presentation on JavaFX and WidgetFX at the Silicon Valley Code Camp.

These are the slides from my presentation on JavaFX and WidgetFX at the Silicon Valley Code Camp.

More in: Technology , Lifestyle
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,741
On Slideshare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
29
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Getting Started with JavaFX and WidgetFX
    Stephen Chin
    Inovis, Inc.
    Keith Combs
    Inovis, Inc.
  • 2. JavaFX Crash Course
  • 3. 3
    Start Here: JavaFX.com
  • 4. 4
    Hello Earthrise
  • 5. 5
    JavaFX API Docs
  • 6. JavaFX Mobile Development
  • 7. JavaFX Mobile Advantages
    Write Once, Run Anywhere
    Desktop, Mobile, Set-top Boxes (future)
    Large Embedded Base
    Built on top of Java ME platform
    Wide Range of Devices
    Runs on Feature Phones, Smart Phones
    Currently available for Windows Mobile devices
  • 8. JavaFX Mobile Constraints
    Screen Size
    Your application has to be capable of running within a resolution of 320 by 240 or possibly even smaller.
    Common Profile
    Mobile applications are limited to the JavaFX APIs that are part of the Common Profile, which is a subset of the Desktop Profile.
    Performance
    Mobile applications run on much less powerful devices, so they have less CPU and memory resources available to work with.
  • 9. Developing for the Common Profile
  • 10. Mobile Demos
    Try out the HTC Touch Diamond
  • 11. Java User Group Spinner Wheel
    11
    Web Service Integration
  • 12. Calling a REST Service
    REST URL:
    http://api.meetup.com/rsvps.json/event_id={eventId}&rsvp=yes&key={apiKey}
    Output:
    { "results": [
    {"zip":"94044","lon":"-122.48999786376953","photo_url":"http://photos1.meetupstatic.com/photos/member/1/4/b/a/member_5333306.jpeg","response":"no","name":"Andres Almiray","comment":"Can't make it :-("}
    ]}
    12
  • 13. JUG Spinner - JSONHandler in 3 Steps
    public class Member {
    public varplace:Integer;
    public varphotoUrl:String;
    public varname:String;
    public varcomment:String;
    }
    varmemberParser:JSONHandler= JSONHandler {
      rootClass: "org.jfxtras.jugspinner.data.MemberSearch “
      onDone: function(obj, isSequence): Void {
        members = (obj as MemberSearch).results;
    }}
    req = HttpRequest {
    location: rsvpQuery
    onInput: function(is: java.io.InputStream) {
    memberParser.parse(is);
    }}
    13
    1
    POJO
    2
    JSONHandler
    3
    HttpRequest
  • 14. 14
    rsvpQuery
    http://jfxtras.org/
  • 15. Silicon Valley JavaFX Users Group
    Free membership
    Rockstar presenters
    First Event:
    Google Campus (Seville Room)
    Speaker: Richard Bair
    Member of the JavaFX Team
    JavaOne 2009 Rockstar Speaker
    December 9th (Tuesday)
    15
    http://svjugfx.org/
  • 16. The JavaFX Desktop Widget Platform
    WidgetFX
  • 17. WidgetFX Origins
    17
  • 18. 18
    Why another desktop widget framework?
    Open-Source
    But widgets can be licensed commercially
    Write Widgets in Java & JavaFX
    HTML, CSS, and Javascript are great for websites, but not app development
    Cross-Platform Support
    Windows XP/Vista, Linux, and Mac OS X.
    One-Click Installation
    Plus automatic updates of the dock and widgets.
    Robust Security
    Secure sandbox + signed widgets
  • 19. Built-in Widgets
    Clock
    Skinnable via CSS
    Slide Show
    Configurable Directory, Speed, & Filter
    Web Feed
    Supports Atom and all RSS flavors
    19
  • 20. 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
    20
  • 21. Movie Widget Tutorial
  • 22. Widget Properties
    22
  • 23. Widget Definition
    var widget: Widget;
    widget = Widget {
    width: 640
    height: 352
    aspectRatio: bind player.media.width
    / player.media.height
    content: bind player
    }
    23
  • 24. 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
    }
    24
  • 25. Run in Widget Runner
    25
  • 26. Widget Configuration Properties
    26
  • 27. Widget Configuration
    widget = Widget {
    ...
    configuration: Configuration {
    properties: [
    StringProperty {
    name: "source“
    value: bind source with inverse
    }
    ]
    scene: Scene {…} // see next page
    }
    }
    27
  • 28. Widget Config Dialog
    Scene {
    content: Grid {
    rows: row([
    Text {
    content: "Source URL:“
    },
    TextBox {
    columns: 30,
    value: bind source with inverse
    }
    ])
    }
    }
    28
  • 29. Add an On-Replace Trigger
    var player = bind SimpleMoviePlayer {
    media: Media {
    source: source
    }
    width: bind widget.width
    height: bind widget.height
    } on replace =oldPlayer {
    oldPlayer.player.stop();
    }
    29
  • 30. Widget Configuration (demo)
    30
  • 31. Widget Development Contest
    31
  • 32. Widget Contest Results
    3rd Place
    Infix WeatherWidget
    Larry Dickson
    2nd Place
    RadioFX
    Yannick Van Godtsenhoven
    32
  • 33. Widget Contest Results
    1st Place
    ScreenshotFX
    Pär Dahlberg
    33
  • 34. Pro JavaFX Book Giveaway!
    34
  • 35. 35
    Thank You
    Stephen Chin
    http://steveonjava.com/
    Tweet: steveonjava
    Keith Combs