万本电子书0元读

万本电子书0元读

顶部广告

Mastering JavaFX 10电子书

售       价:¥

46人正在读 | 0人评论 6.2

作       者:Sergey Grinev

出  版  社:Packt Publishing

出版时间:2018-05-31

字       数:23.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Design modern, rich interfaces for Java apps using JavaFX 10 About This Book ? Become a pro with the latest JavaFX 10 framework ? Create dynamic content using the animation API ? Create and customize plugins and use them efficiently in different applications 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. 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 In Detail 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. Style and approach The book adopts a practical, step-by-step approach.
目录展开

Title Page

Copyright and Credits

Mastering JavaFX 10

Dedication

www.PacktPub.com

Why subscribe?

PacktPub.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

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

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

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

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

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

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

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

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

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

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

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

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

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

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部