The Definitive Guide to Modern Java Clients with JavaFX - Stephen Chin, Johan Vos, James Weaver

The Definitive Guide to Modern Java Clients with JavaFX (eBook)

Cross-Platform Mobile and Cloud Development
eBook Download: PDF
2019 | 1st ed.
XXII, 621 Seiten
Apress (Verlag)
978-1-4842-4926-0 (ISBN)
Systemvoraussetzungen
46,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
Build enhanced visual experiences and design and deploy modern, easy-to-maintain, client applications across a variety of platforms. This book will show you how these applications can take advantage of the latest user interface components, 3D technology, and cloud services to create immersive visualizations and allow high-value data manipulation. 

The Definitive Guide to Modern Java Clients with JavaFX is a professional reference for building Java applications for desktop, mobile, and embedded in the Cloud age. It offers end-to-end coverage of the latest features in JavaFX and Java 13. After reading this book, you will be equipped to upgrade legacy client applications, develop cross-platform applications in Java, and build enhanced desktop and mobile native clients.


What You Will Learn
  • Create modern client applications in Java using the latest JavaFX and Java 13
  • Build enterprise clients that will enable integration with existing cloud services 
  • Use advanced visualization and 3D features
  • Deploy on desktop, mobile, and embedded devices

Who This Book Is For

Professional Java developers who are interested in learning the latest client Java development techniques to fill out their skillset. 



Stephen Chin is Senior Director of Developer Relations at JFrog, author of Raspberry Pi with Java and co-author of Pro JavaFX Platform. He has keynoted numerous Java conferences around the world, including Oracle Code One (formerly JavaOne), where he is an 8-time Rock Star Award recipient. Stephen is an avid motorcyclist who has done evangelism tours in Europe, Japan, and Brazil, interviewing hackers in their natural habitat. When he is not traveling, he enjoys teaching kids how to do embedded and robot programming together with his teenage daughter.

Johan Vos started to work with Java in 1995. He was part of the Blackdown team, porting Java to Linux. His main focus is on end-to-end Java, combining back-end systems and mobile/embedded devices. He received a Duke Choice award in 2014 for his work on javafx on mobile. In 2015, he co-founded Gluon, which allows enterprises to create (mobile) Java Client applications leveraging their existing backend infrastructure. Gluon received a Duke Choice award in 2015. Johan is a Java Champion and an Oracle Developer Champion, a member of the BeJUG steering group, the Devoxx steering group and he is a JCP member. He has been a speaker at numerous conferences on Java.

James Weaver is a Java developer, author, and speaker with a passion for cloud-native applications,  machine learning, and quantum computing. He is a Java Champion, and a JavaOne Rockstar. James has written books including Inside Java, Beginning J2EE, the Pro JavaFX series, and Java with Raspberry Pi. As a Pivotal Developer Advocate, James speaks internationally at software technology conferences.  He tweets as @JavaFXpert.

Build enhanced visual experiences and design and deploy modern, easy-to-maintain, client applications across a variety of platforms. This book will show you how these applications can take advantage of the latest user interface components, 3D technology, and cloud services to create immersive visualizations and allow high-value data manipulation. The Definitive Guide to Modern Java Clients with JavaFX is a professional reference for building Java applications for desktop, mobile, and embedded in the Cloud age. It offers end-to-end coverage of the latest features in JavaFX and Java 13. After reading this book, you will be equipped to upgrade legacy client applications, develop cross-platform applications in Java, and build enhanced desktop and mobile native clients.What You Will LearnCreate modern client applications in Java using the latest JavaFX and Java 13Buildenterprise clients that will enable integration with existing cloud services Use advanced visualization and 3D featuresDeploy on desktop, mobile, and embedded devicesWho This Book Is ForProfessional Java developers who are interested in learning the latest client Java development techniques to fill out their skillset. 

Table of Contents 4
About the Authors 14
About the Contributors 15
About the Technical Reviewer 19
Foreword 20
Chapter 1: Getting Started with Client Java 22
Java Client Technology in Action 22
Java Client in Business 23
Gaming and 3D 24
Mobile Conference Apps 26
A Modern Approach to Client Java 27
Target Mobile First 27
Build for the Cloud 29
Package Your Platform 31
Setting Up Your Environment 32
Mac OS X JDK Installation 33
Windows JDK Installation 34
Linux JDK Installation 38
JavaFX Installation 38
Your First Modern Java Client 40
Coding Client Apps with IntelliJ IDEA 40
Rapid Application Development with Scene Builder 46
The Path to Modern Client Development 53
Chapter 2: JavaFX Fundamentals 54
JavaFX Stage and Scene Graph 54
JavaFX Is Single-Threaded 55
Hierarchical Node Structure 55
A Simple Shape Example 57
Color 59
Text Is a Shape 60
The JavaFX Coordinate System 60
Layout Controls 61
StackPane 61
AnchorPane 62
GridPane 62
FlowPane and TilePane 63
BorderPane 63
SplitPane 64
HBox, VBox, and ButtonBar 64
Make a Scene 64
Enhancing the MyShapes Application 65
Linear Gradient 65
DropShadow 66
Reflection 67
Configuring Actions 68
Animation 69
JavaFX Properties 71
Property Listeners 72
Invalidation Listeners 72
Change Listeners 74
Binding 75
Unidirectional Binding 75
Bidirectional Binding 76
Fluent API and Bindings API 76
Using FXML 78
Controller Class 81
JavaFX Application Class 83
Adding CSS 84
Using Scene Builder 86
Putting It All Together 87
Master-Detail UI 87
The Model 90
Observable Lists 92
Implementing ListView Selection 93
Using Multiple Selection 93
ListView and Sort 94
Person UI Application Actions 95
Delete a Person 95
Add a Person 96
Update a Person 97
Key Point Summary 100
Chapter 3: Properties and Bindings 102
Key Concepts 103
Observable and InvalidationListener 104
ObservableValue and ChangeListener 104
WritableValue and ReadOnlyProperty 105
JavaFX Properties 105
Creating Bindings 110
JavaFX Bindings 110
Create Bindings by Direct Extension 111
Type-Specific Specializations 113
Factory Methods in Bindings 116
Create Bindings with the Fluent API 119
Observable Collections 125
Factory and Utility Methods in FXCollections 125
Change Listeners for Observable Collections 130
Change Events in ListChangeListener 133
Change Events in MapChangeListener 138
Change Events in SetChangeListener 141
Change Events in ArrayChangeListener 143
Create Bindings for Observable Collections 145
JavaFX Beans 146
Eagerly Instantiated Property 147
Half-Lazily Instantiated Property 149
Fully Lazily Instantiated Property 150
Selection Bindings 151
Adapting Java Beans 154
Summary 161
Resources 162
Chapter 4: JavaFX Controls Deep Dive 163
The UI Controls Module 164
What Is a UI Control? 164
JavaFX Basic Controls 165
Labeled Controls 165
Label 166
Button 167
CheckBox 168
Hyperlink 169
ToggleButton 169
RadioButton 171
Text Input Controls 171
TextFormatter 172
TextField, PasswordField, and TextArea 173
Other Simple Controls 174
ProgressBar and ProgressIndicator 174
Slider 175
Container Controls 176
Accordion and TitledPane 176
ButtonBar 177
ScrollPane 178
SplitPane 180
TabPane 181
ToolBar 183
Other Controls 184
HTMLEditor 184
Pagination 185
ScrollBar 186
Separator 186
Spinner 187
Tooltip 188
Popup Controls 189
Menu-Based Controls 189
Menu and MenuItem 189
MenuBar 191
MenuButton and SplitMenuButton 192
ContextMenu 194
ChoiceBox 196
ComboBox-Based Controls 197
ComboBox 198
ColorPicker 199
DatePicker 200
JavaFX Dialogs 201
Alert 201
ChoiceDialog 202
TextInputDialog 203
Dialog and DialogPane 204
Advanced Controls 205
ListView 205
Cells and Cell Factories 206
Cell Editing 208
Pre-built Cell Factories 210
TreeView 211
TableView 212
TableColumn and TreeTableColumn 214
Nested Columns 217
Cell Factories in TableView 218
TreeTableView 218
Selection and Focus Models 220
SelectionModel 220
FocusModel 221
Summary 222
Acknowledgments 222
Chapter 5: Mastering Visual and CSS Design 223
Introduction to Cascading Style Sheets 223
Selectors Based on Class Name 226
Selectors Based on Custom Style Classes 226
Selectors Based on Object ID 226
Applying CSS Styles 227
Loading CSS Stylesheets 227
Applying CSS Styles to JavaFX Nodes 228
Advanced CSS Techniques 231
Using Descendant Selectors 231
Using Pseudo-classes 232
Using Imports 233
Font Loading in the Stylesheet 233
Reusing Styles 233
Using Advanced Color Definitions 234
Using Linear Gradients 234
Using Radial Gradients 235
Using Image Pattern 236
Using RGB Color Definitions 237
Using HSB Color Definitions 238
Using Color Functions 239
Using Effect Definitions 240
Drop Shadow 240
Inner Shadow 240
Useful Tips and Tricks 241
Study Modena Stylesheet 241
Define Themes Based on Modena 241
Define Icons Using CSS 243
CSS Reusability by Using Color Constants 243
Using Transparent Colors 243
Advanced CSS API 245
CSS in JavaFX Applications: Summary 253
Chapter 6: High-Performance Graphics 255
Using Canvas 256
Giving Life to a Canvas Application 262
Particle Systems 267
Fractals 278
High Performance 291
Conclusion 304
Chapter 7: Bridging Swing and JavaFX 305
Integrating JavaFX into Swing 305
JFXPanel: Swing Component with JavaFX Inside 306
Threading 311
Interaction Between Swing and JavaFX 313
Drag and Drop with JavaFX and Swing 321
JavaFX 3D Integrated in Swing 324
Integrating Swing into JavaFX 326
Migration Strategies 328
Large-Scale Integrations 328
Conclusion 329
Chapter 8: JavaFX 3D 330
Prerequisites 330
Getting Started with Shapes 331
Shape3D 337
Sphere 338
Box 338
Cylinder 339
Creating User-Defined 3D Shapes 339
Camera 353
ParallelCamera 354
PerspectiveCamera 354
Light 358
Understanding the LightBase Class 359
Understanding the AmbientLight Class 359
Understanding the PointLight Class 359
Material 365
Understanding the PhongMaterial Class 366
Adding Texture to 3D Shapes 370
Interacting with JavaFX 3D Scenes 375
Understanding the PickResult Class 376
Third-Party Software: FXyz 3D 381
FXyz 3D Sample 382
Conclusion 384
Chapter 9: JavaFX, the Web, and Cloud Infrastructure 385
Integrating with the Web 387
Displaying a Web Page 387
Adding Navigation and History 388
Showing Loading Progress 391
Executing JavaScript 392
Registering Java Callbacks 398
FXML and the Model View ViewModel Pattern 400
Writing a Controller for HTML 402
Adding the HTML View 406
HTML Data Binding Explained 408
Displaying a Map with DukeScript 412
From Web Sites to APIs 414
Building for the Cloud 414
Architecture of a JavaFX Cloud Application 415
Use Case: Querying OpenWeather 415
Conclusion 427
Chapter 10: Packaging Apps for the Desktop 428
Web vs. Desktop Applications 428
Evolutions in Application Deployment 430
The jpackage Tool 432
What Is jpackage? 432
Using jpackage 434
Jpackage Usage 435
Jpackage Options 435
Requirements 440
Inno Setup 440
Samples 441
Non-modular Application: Sample1 441
Instructions for Windows 441
Modifying the Installer 444
Mac OS X 445
Modifying the Installer 447
Linux 448
Modular Application: Sample2 449
Windows 450
Mac OS X 451
Linux 452
Gradle Projects 453
Using Graal’s Native 455
Requirements 456
The Code 457
Maven Project 458
Gradle Project 460
Build the Project 461
Compile 462
Link 463
Run 464
Conclusion 465
Chapter 11: Native Mobile Apps for iOS and Android 467
Why JavaFX on Mobile 468
Different Approaches for Mobile Apps 469
OS-Specific Native Controls 470
Mobile Web Sites 470
Device Native Rendering 470
Hello, JavaFX on iOS 472
Client Plugins to Reduce Complexity 472
The Development Flow 473
The Code 475
Requirements 480
Build the Project 481
Compile 483
Link 484
Run 484
How Does It Work? 486
Using the Plugin Options 487
bundlesList 488
resourcesList 488
reflectionList 489
jniList 489
delayInitList 489
releaseSymbolsList 489
Creating Real Mobile-Looking Apps 489
Different Stylesheets 490
Mobile-Specific Controls 494
The Code 495
Build the Project 502
Summary 505
Chapter 12: JavaFX 11 on Raspberry Pi 506
Intro to Raspberry Pi 506
Getting Started with a Raspberry Pi 507
Initial Kit 507
Raspberry Pi 507
Power Adaptor 508
SD Card 508
Monitor 508
Install SD 508
Raspberry Pi Configuration 510
Raspi-config 511
Remote Connection via SSH 514
Installing Java 11 515
Java 11 for ARM 516
Testing Java 11 517
Installing JavaFX 11 518
Running JavaFX Applications Locally 519
Running JavaFX Applications Remotely 524
Java Remote Platform 525
Gradle SSH Plugin 528
Working with Dependencies 531
The DIY In-Car Navigation System 531
Bill of Materials 531
Setup for GPIO 532
GPIO Connections 533
Required GPS Software 534
NMEA Readings 536
GPIO and Java 543
The UI 547
Gluon Maps 547
Afterburner 549
Scene Builder 549
The Application Class 559
Deploy and Test 563
Next Challenge 565
Conclusions 565
Chapter 13: Machine Learning and JavaFX 566
What Is Machine Learning 566
Supervised Learning 567
Unsupervised Learning 567
Artificial Neural Networks 567
Convolutional Neural Networks 569
Eclipse DeepLearning4J: Java API for Neural Networks 571
Training Neural Networks from a JavaFX Application 574
Read an Image from JavaFX to a Neural Network 580
Detecting Objects in a Video 584
Chapter 14: Scientific Applications Using JavaFX 594
JavaFX for Space Exploration 594
JavaFX for Quantum Computing 596
Using JShell 599
Using JShell 601
About ND4J 605
Using ND4J in JShell 609
USING JavaFX in JShell 613
Starting Stand-Alone JavaFX Code 614
JavaFX Applications in JShell 617
JavaFX Libraries in JShell 620
Conclusion 624
Index 625

Erscheint lt. Verlag 12.11.2019
Co-Autor Gail Anderson, Paul Anderson, Bruno Borges, Anton Epple, Weiqi Gao, Jonathan Giles, José Pereda, Sven Reimers, Eugene Ryzhikov, William Antônio Siqueira
Zusatzinfo XXII, 621 p. 186 illus., 48 illus. in color.
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
Informatik Weitere Themen Smartphones / Tablets
Schlagworte authoritative • Clients • Cloud • Code • definitive • Development • Experts • Java • Java 11 • Java Champion • Java FX • JavaFX • Mobile • Oracle • programming • source • UI • User Experience • User Interfaces • UX
ISBN-10 1-4842-4926-7 / 1484249267
ISBN-13 978-1-4842-4926-0 / 9781484249260
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 14,2 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Einführung, Ausbildung, Praxis

von Christian Ullenboom

eBook Download (2023)
Rheinwerk Computing (Verlag)
37,43
Moderne GUIs für RIAs und Java-Applikationen

von Ralph Steyer

eBook Download (2022)
Springer Fachmedien Wiesbaden (Verlag)
42,99