售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜