Free Sample
+ Collection

JavaFX 1.2 Application Development Cookbook

Cookbook
Vladimir Vivien

Over 60 recipes to create rich Internet applications with many exciting features
$23.99
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook

Want this title & more?

$21.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847198945
Paperback332 pages

About This Book

  • Easily develop feature-rich internet applications to interact with the user using various built-in components of JavaFX
  • Make your application visually appealing by using various JavaFX classes—ListView, Slider, ProgressBar—to display your content and enhance its look with the help of CSS styling
  • Enhance the look and feel of your application by embedding multimedia components such as images, audio, and video
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible

Who This Book Is For

If you are a Java developer, Rich Internet Application content developer, or graphic designer who wants to build RIAs featuring animations, videos, and other feature-rich content, this book is for you. Knowledge of Java, JavaScript, and JavaFX components is not essential, but will help you exploit this book to your advantage.

Table of Contents

Chapter 1: Getting Started with JavaFX
Introduction
Installing the JavaFX SDK
Setting up JavaFX for the NetBeans IDE
Setting up JavaFX for the Eclipse IDE
Using javafxc to compile JavaFX code
Creating and using JavaFX classes
Creating and using variables in JavaFX
Using binding and triggers to update variables
Creating and using JavaFX functions
Integrating your JavaFX code with Java
Creating and using JavaFX sequences
Working with JavaFX String
Chapter 2: Creating JavaFX Applications
Introduction
Building a JavaFX application
Drawing simple shapes
Creating complex shapes using Path
Creating shapes with constructive area geometry
Drawing letter shapes using the Text class
Handling user input
Arranging your nodes on stage
Making your scripts modular
Creating your own custom node
Controlling your application's window style
Going full-screen
Chapter 3: Transformations, Animations, and Effects
Introduction
Modifying shapes with the Transformation API
Creating simple animation with the Transition API
Composing animation with the Transition API
Building animation with the KeyFrame API
Creating custom interpolators for animation
Morphing shapes with the DelegateShape class
Using data binding to drive animation sequences
Applying cool paint effects with gradients
Creating your own customized Paint
Adding depth with lighting and shadow effects
Creating your own Text effect
Adding visual appeal with the Reflection effect
Chapter 4: Components and Skinning
Introduction
Creating a form with JavaFX controls
Displaying data with the ListView control
Using the Slider control to input numeric values
Showing progress with the progress controls
Creating a custom JavaFX control
Embedding Swing components in JavaFX
Styling your applications with CSS
Using CSS files to apply styles
Skinning applications with multiple CSS files
Chapter 5: JavaFX Media
Introduction
Accessing media assets
Loading and displaying images with ImageView
Applying effects and transformations to images
Creating image effects with blending
Playing audio with MediaPlayer
Playing video with MediaView
Creating a media playback component
Chapter 6: Working with Data
Introduction
Saving data locally with the Storage API
Accessing remote data with HttpRequest
Downloading images with HttpRequest
Posting data to remote servers with HttpRequest
Uploading files to servers with HttpRequest
Building RESTful clients with the PullParser API
Using the Feed API to create RSS/Atom clients
Visualizing data with the JavaFX chart API
Chapter 7: Deployment and Integration
Introduction
Building and packaging your app with an IDE
Building and packaging your app with javafxpackager
Packaging your app to be Web Start(ed)
Packaging your app as an applet
Passing arguments to JavaFX applications
Making your applets drag-to-install
Controlling JavaFX applets from JavaScript
Chapter 8: The JavaFX Production Suite
Introduction
Loading multiple images dynamically
Exporting Adobe Photoshop graphics to JavaFX
Exporting Adobe Illustrator graphics to JavaFX
Exporting Scalable Vector Graphics (SVG) to JavaFX
Using objects loaded from FXZ files

What You Will Learn

  • Dive into the JavaFX scripting language fundamentals by creating and declaring classes, functions, trigger variables, and more
  • Create complex graphical components with simplified declarative constructs and arrange these building blocks to create applications in JavaFX
  • Effortlessly make your objects visually appealing by applying cool effects
  • Quickly build an application that provides a high level of interactivity by using JavaFX GUI controls
  • Seamlessly play audio and video in several formats using built-in media components
  • Access data and manipulate data locally or remotely using tools that are available in JavaFX
  • Achieve data visualization using the newly added feature—JavaFX chart components
  • Make your applications available for easy access and use by implementing deployment options such as Java WebStart and applets available in JavaFX
  • Take advantage of runtime contexts to interact with the executing environment with integration tips and tricks

In Detail

JavaFX Script enables you to easily create rich Internet applications by embedding multimedia components. Although you can create stylish Internet applications by modifying these default components, even advanced users find it challenging to create impressive feature-rich Internet applications with JavaFX. Also, there are limited JavaFX components to work with and by default these components don't look visually appealing.

This book explores limitless possibilities to style your application by coding JavaFX components to display your content in a more appealing fashion. The recipes in this book will help you to create customized JavaFX components with which you can make modern, feature-rich applications.

First, you will be introduced to the JavaFX SDK and other development tools available to help you be productive during development. You will create an application in JavaFX by arranging complex graphical components (and non-graphical libraries) with simplified declarative constructs. You will then explore the fun side of JavaFX by using transformation techniques to manipulate the location and dimensions of objects. The next chapter is about the GUI components that are available in the framework, which provide a high level of interactivity. You will learn how to use the media component to play media content. Then we will access data and manipulate data locally or remotely. You will explore many deployment options and integration tips and tricks to take advantage of runtime contexts. Finally, you will interact with pure Java code to read and write files in JavaFX and to establish interactions with computing platforms.

Authors

Read More