Mastering JavaFX 10 - Build Advanced and Visually Stunning Java Applications ... [true pdf]

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Key Features ------------ Leverage advanced GUI programming techniques using the latest JavaFX 10 framework. Create dynamic content using the animation API and work with different application layers Create and customize plugins and use them efficiently in different applications --- Book Description ---------------- JavaFX 10 is used to create media-rich client applications. This book takes you on a journey to use JavaFX 10 to build applications that display information in a high-performance, modern user interface featuring audio, video, graphics, and animation. Mastering JavaFX 10 begins by introducing you to the JavaFX API. You will understand the steps involved in setting up your development environment and build the necessary dependencies. This is followed by exploring how to work with the assets, modules, and APIs of JavaFX. This book is filled with practical examples to guide you through the major features of JavaFX 10. In addition to this, you will acquire a practical understanding of JavaFX custom animations, merging different application layers smoothly, and creating a user-friendly GUI with ease. By the end of the book, you will be able to create a complete, feature-rich Java graphical application using JavaFX. --- What you will learn ------------------- Construct and customize JavaFX windows Manage UI elements and arrange them on the Scene Explore the Bindings API and use it to coordinate various UI elements Use FXML to design amazing FX applications Write and manage CSS to style your applications Add audio and video to your projects Prepare your application to be launched on the target platform --- Who this book is for -------------------- If you’re a Java developer who wants to upgrade to the latest version of JavaFX to create stunning, feature-rich graphical applications, this book is for you. Some basic knowledge of Java programming is necessary to get the most out of this book. prior JavaFX knowledge will help but is not mandatory.

Author(s): Sergey Grinev
Edition: 1
Publisher: Packt
Year: 2018

Language: English
Pages: 270
Tags: javafx java

Cover
Title Page
Copyright and Credits
Dedication
www.PacktPub.com
Contributors
Table of Contents
Preface
Chapter 1: Stages, Scenes, and Layout
Application and JavaFX subsystems
Components of the JavaFX toolkit
Glass toolkit
Prism and Quantum Toolkit
Media
WebView/WebEngine
Working with JavaFX Application Thread
Application class
Using the Application.launch() method
Managing command-line parameters
Closing the JavaFX application
Stage – a JavaFX term for the window
Working with Stage modality options
Using Stage styles
Setting fullscreen and other window options
Scene and SceneGraph
Organizing the Scene content with Layout Managers
Free layout
The most basic layout manager – Group
Region and Pane layout managers
Behavioral layout
Positional layout
TilePane and FlowPane
BorderPane layout manager
AnchorPane layout manager
GridPane layout manager
Clock demo
Summary
Chapter 2: Building Blocks – Shapes, Text, and Controls
Shapes and their properties
JavaFX shapes overview
Closed shapes
Lines
Curves
Paths
Adding Text to the JavaFX scene
Controlling Shape's color
Paint
ImagePattern
Gradients
Customizing lines with Stroke API
Basic Stroke
Dashed lines
Connecting line designs using Line Join
Working with the Shape operations
Transformations
Coordinates and bounds
Working with Bounds Demo
Using the ScenicView tool to study JavaFX scenegraph 
Basic Controls
Button and Event Handlers
Size of the Controls
Clock demo
Summary
Chapter 3: Connecting Pieces – Binding
Working with the Property API
Using the Observable API
Introducing the Binding API
Rules of binding
 Read-only properties  
Binding is a one-to-many relation
Binding blocks setters
Bidirectional binding
Using binding for visual help
The role of listeners
Using binding operations
String operations
Arithmetic operations
Boolean operations
Working with bidirectional binding and converters
Creating custom bindings
Implementing base binding classes
Bindings helper function
Understanding binding collections
Summary
Chapter 4: FXML
Introduction to FXML
Basics of FXML
Benefits of FXML
Limitations of FXML
Working with FXML loaders
Working with resources
Using the FXMLLoader API
Working with the fx:root attribute and custom components
Working with Controllers
Enhancing Controllers
Using a preconstructed Controller
Working with data
Syntax details of FXML
Reviewing the basics of FXML
Importing packages
Including other FXML files
Using FXML defines
Default properties
Referring to resources from FXML
Adding business logic to FXML
Using static methods in FXML
SceneBuilder
Working with a WYSIWYG editor
Features
Specifying CSS files through the Preview menu
Localization in Preview
Summary
Chapter 5: Animation
What is an animation?
Animation example
Understanding KeyFrame and KeyValue
Adding handlers and timers
Working with the Timeline API
Adding cue points
Using the Interpolator API
Predefined interpolators
Using transitions – the predefined animations
Using movement and resize transitions
Using TranslateTransition
Using PathTransition
Using RotateTransition
Using ScaleTransition
Working with color transitions
Combining transitions
Building an animated application
Summary
Chapter 6: Styling Applications with CSS
Introduction to CSS
FirstStyles demonstration
Matching JavaFX nodes using selectors
Understanding naming convention for style classes and properties
Using type selectors
Styling specific objects using ID selectors
Loading CSS files from the JavaFX code
Applying styles to JavaFX nodes
Having several CSS files in one JavaFX application
Using the setStyle() method
Calling a corresponding API method
Referring to CSS styles from FXML
Using global JavaFX style sheets
Understanding cascading – the priority scheme for different styling methods
Working with advanced CSS syntax
Using pseudo-classes
Working with descendant selectors
Working with imports, fonts, and URLs
Working with constants and the inherit keyword
Why use CSS?
Using the CSS API
Introducing ClockControl
Adding a new style class
Using the new CSS property
Summary
Chapter 7: Building a Dynamic UI
Tuning min and max size properties
Controlling node location with AnchorPane
Planning node size behavior with grow priorities
Fluid layouts
Enhancing applications with scrolling
Summary
Chapter 8: Effects
Applying basic effects
Adding shadow effects
Using DropShadow
Using InnerShadow
Understanding the base Shadow effect
Adding reflections
Combining effects
Distorting using blur effects
Adding color effects
Using ColorAdjust
Using ColorInput
Using SepiaTone
Bloom and Glow
Applying lighting effects
Understanding the types of light
Using Distant light
Using Spot light
Using Point light
Using BumpInput
Transformation effects
Setting up PerspectiveTransform
Distorting an image with DisplacementMap
Using blend effects
Cutting out with the SRC_ATOP blend mode
Calculating the difference between images
Lightening and darkening
Other blend modes
Summary
Chapter 9: Media and WebView
Working with web content
Presenting web content with WebView
Context menu
Accessibility features
Web engine
Handling page loading progress with LoadWorker 
Loading content and user interface callbacks
Using Document Object Model
Running JavaScript on a page
Calling JavaFX code from JavaScript
Incorporating media into a JavaFX application
Adding audio clips
Working with the MediaPlayer and Media classes
Adding video through MediaView
Summary
Chapter 10: Advanced Controls and Charts
Advanced controls
ListView
Managing ListView items
Using Selection and Focus API
Editable lists
Creating the TextFieldListCell
Editing through a ChoiceBox/ComboBox
Using CheckBox
Creating custom cells
Using TableView
TableModel
Creating and combining columns to form tables
Sorting
Observable Model
Making a table editable
Working with JavaFX charts
Creating a Pie chart
Creating a Line chart
Review of other XY charts
Custom controls
Skins
ClockControl demo
Java 9 and 10 API for skins
Summary
Chapter 11: Packaging with Java9 Jigsaw
Handmaking JAR files
Running the demo project
Basic commands of the javapackager tool
Creating self-contained applications
Preparing OS-native installers with javapackager
Working with Jigsaw modules
Making our own module
Summary
Chapter 12: 3D at a Glance
Introduction to the JavaFX 3D API
Basic 3D elements
Adding Camera to the Scene
Lighting the Scene
Using Materials
Using Bump Map
Working with the Diffuse and Self-Illumination maps
Summary
Chapter 13: What's Next?
Other materials
Official documentation of JavaFX
Stackoverflow.com
Working with JavaFX source code
Beyond the official API
Frameworks and libraries
Blogs
Future of JavaFX
Summary
Other Books You May Enjoy
Index