Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology

Book description

In Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology, Jim Weaver, Weiqi Gao, Stephen Chin, Dean Iverson, and Johan Vos show you how you can use the JavaFX platform to create rich-client Java applications. You'll see how JavaFX provides a powerful Java-based UI platform capable of handling large-scale data-driven business applications.

Covering the JavaFX API, development tools, and best practices, this book provides code examples that explore the exciting new features provided with JavaFX 2. It contains engaging tutorials that cover virtually every facet of JavaFX development and reference materials on JavaFX that augment the JavaFX API documentation. Written in an engaging and friendly style, Pro JavaFX 2 is an essential guide to JavaFX 2.

What you'll learn

  • How to get started with JavaFX 2, including downloading the SDK and available tools.

  • How to express user interfaces with a declarative-style enabled by the JavaFX builder classes.

  • How to use property binding to keep the UI easily in sync with the model.

  • How to use the rich set of JavaFX UI controls, charts, shapes, effects, transformations, and animations to create stunning, responsive, user interfaces.

  • How to use the powerful JavaFX layout classes to define the user interface in a cross-platform fashion.

  • How to leverage the observable collection classes to observe changes in, and bind to, Java collections.

  • How to use the JavaFX media classes to play audio and video.

  • How to interact with external application services to create an enterprise application with JavaFX.

  • How to use the JavaFX API with alternative languages such as Scala, Groovy, and Visage.

  • How to uncover the JavaFX APIs to whatever degree you choose. The tutorials, reference materials, and pointers to resources are exhaustive.

Who this book is for

Application developers, graphic designers, and IT decision makers. Not only does this book contain comprehensive technical information for developers and designers, it builds a compelling case for choosing JavaFX for web applications and RIAs.

Table of contents

  1. Title
  2. Contents at a Glance
  3. Contents
  4. Foreword
  5. About the Authors
  6. About the Technical Reviewer
  7. Acknowledgments
  8. CHAPTER 1: Getting a Jump Start in JavaFX
    1. JavaFX Can't Bring Rich-Client Java Back by Itself
    2. A Brief History of JavaFX
    3. Going to the Source: Oracle's JavaFX Web Site
    4. Accessing the JavaFX SDK API
    5. Obtaining the JavaFX SDK
    6. Other Available Tools
    7. Developing Your First JavaFX Program: “Hello Earthrise”
    8. Compiling and Running from the Command-Line
    9. Understanding the Hello Earthrise Program
    10. Developing Your Second JavaFX Program: “More Cowbell!”
    11. Surveying JavaFX Features
    12. Summary
    13. Resources
  9. CHAPTER 2: Creating a User Interface in JavaFX
    1. Introduction to Node-Centric UIs
    2. Setting the Stage
    3. Making a Scene
    4. Handling Input Events
    5. Animating Nodes in the Scene
    6. Summary
    7. Resources
  10. CHAPTER 3: Properties and Bindings
    1. Forerunners of JavaFX 2.0 Binding
    2. A Motivating Example
    3. Understanding Key Interfaces and Concepts
    4. Type-Specific Specializations of Key Interfaces
    5. Creating Bindings
    6. Understanding the JavaFX Beans Convention
    7. Summary
    8. Resources
  11. CHAPTER 4: Building Dynamic UI Layouts in JavaFX
    1. Introducing JavaFX Reversi
    2. Dynamic Layout Techniques
    3. Creating Custom Regions
    4. Laying Out the Tiles Using a GridPane
    5. Aligning and Stretching with AnchorPane
    6. When to Use Different Layouts
    7. A New Perspective on Reversi: The JavaFX 3D Scene Graph
    8. Bringing Reversi to Life
    9. Summary
    10. Resources
  12. CHAPTER 5: Using the JavaFX UI Controls
    1. Trying Out the JavaFX UI Controls
    2. Leveraging the JavaFX UI Controls
    3. Summary
    4. Resources
  13. CHAPTER 6: Collections and Concurrency
    1. Understanding Observable Collections
    2. Using the JavaFX Concurrency Framework
    3. Embedding JavaFX Scenes in Swing and SWT Applications
    4. Summary
    5. Resources
  14. CHAPTER 7: Creating Charts in JavaFX
    1. Structure of the JavaFX Chart API
    2. Using the JavaFX PieChart
    3. Using the XYChart
    4. Summary
    5. Resources
  15. CHAPTER 8: Using the Media Classes
    1. The Foundation
    2. Supported Media Formats
    3. Working with Audio Clips
    4. Working with Media
    5. Playing Audio
    6. Playing Video
    7. Summary
  16. CHAPTER 9: Accessing Web Services
    1. Front-end and Back-end Platforms
    2. Merging JavaFX and Java Enterprise Modules in the Same Environment
    3. Using JavaFX to Call Remote (Web) Services
    4. Summary
  17. CHAPTER 10: JavaFX Languages and Markup
    1. A Quick Comparison of Alternative Languages
    2. Making Your JavaFX Groovy
    3. Scala and JavaFX
    4. Visage, the JavaFX Language
    5. Constructing UIs with FXML Markup
    6. Summary
    7. Resources
  18. APPENDIX: The Visage Language in Depth
    1. An Overview of Visage
    2. Variables, Values, and Their Types
    3. Primitive Types
    4. Working with Sequences
    5. Visage Expressions
    6. Object Literals
    7. Working with Data Bindings
    8. Working with Functions
    9. Working with Classes
    10. Organizing Visage Code
    11. Triggers
    12. String Formatting and Internationalization
    13. Leveraging Java from Visage
    14. Visage Reflection
    15. Resources
  19. Index

Product information

  • Title: Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology
  • Author(s): Weiqi Gao Ph.D., Johan Vos Ph.D.
  • Release date: February 2012
  • Publisher(s): Apress
  • ISBN: 9781430268727