You are previewing Mastering JavaFX 8 Controls.
O'Reilly logo
Mastering JavaFX 8 Controls

Book Description

Design and Deploy High-Performance JavaFX Controls

Deliver state-of-the-art applications with visually stunning UIs. Mastering JavaFX 8 Controls provides clear instructions, detailed examples, and ready-to-use code samples. Find out how to work with the latest JavaFX APIs, configure UI components, automatically generate FXML, build cutting-edge controls, and effectively apply CSS styling. Troubleshooting, tuning, and deployment are also covered in this Oracle Press guide.

  • Understand the properties of JavaFX 8 controls and APIs
  • Create custom controls, transformations, and layouts
  • Work from JavaFX Scene Graph and Scene Builder
  • Visualize data models using advanced control types
  • Use ListView, TableView, and TreeView APIs
  • Handle audio and video content using JavaFX media classes
  • Maximize separation between UI and application logic using FXML
  • Style controls and applications using CSS
  • Extend functionality of Swing and SWT applications with JavaFX

Code examples in the book are available for download.

Table of Contents

  1. CoverĀ 
  2. Title Page
  3. Copyright Page
  4. About the Author
  5. ContentsĀ 
  6. Introduction
  7. Chapter 1: The History of Java UI Toolkits
    1. Java SE UI Toolkits
      1. AWT
      2. Java Foundation Classes and the Emergence of Swing
      3. Swing
    2. Additional UI Toolkits
      1. SWT
      2. Apache Flex
    3. The Way to JavaFX
      1. From F3 to JavaFX 8
    4. JavaFX Compared to HTML5 and Web-Based Technologies
      1. Java-Based Web Frameworks
    5. Summary
  8. Chapter 2: JavaFX Basics
    1. Your First JavaFX Application
      1. JavaFX Application Life Cycle
      2. Defining the Main Window by Using the Stage Class
      3. The Scene Graph
    2. Technical Design of the JavaFX Toolkit
      1. The Native Layer
      2. Private API Layer
      3. Public API Layer
    3. JavaFX Public APIs
      1. Application and Life Cycle
      2. Stage API
      3. Scene Graph and Controls
      4. Event Handling
      5. Property API
      6. Collections
      7. Concurrent API
      8. Animations
      9. FXML
      10. CSS Support
      11. Printing
      12. Interoperability with Swing
    4. Tools
      1. Scene Builder
      2. Scenic View
      3. FX Experience Tools
    5. Deployment/Native Builds
    6. JavaFX Goes Polyglott
      1. GroovyFX
      2. ScalaFX
      3. JavaFX and Nashorn
    7. Summary
  9. Chapter 3: The Scene Graph
    1. Using and Integrating the Scene Graph in a JavaFX Application
    2. The Scene Class
    3. Event Handling
    4. Node Types
      1. Primitive Nodes
      2. LayoutPanes
      3. Complex Nodes
    5. Node Basics
    6. FXML
    7. Summary
  10. Chapter 4: Laying Out and Transforming Nodes in the Scene Graph
    1. Adding Some Transformations
      1. Adding a Third Dimension
      2. Extended Transformation APIs
    2. Laying Out Nodes
      1. Creating a Custom Pane
      2. The Visual Structure of a Region
      3. Extended Internal Layout Mechanisms
      4. Additional Layout Mechanisms
      5. The javafx.geometry Package
      6. Working with Constraints
    3. Combining Transforms and Layout
      1. Accessing the Bounds of a Node
    4. Summary
  11. Chapter 5: JavaFX Basic Controls
    1. The Control Class
    2. Basic Controls
      1. Labeled Controls
      2. Controls for Text Input
      3. Slider
      4. ProgressIndicator and ProgressBar
    3. Tooltip of a Control
    4. Using Menus in JavaFX
      1. Using Separators
    5. Creating an Application with Basic Controls
    6. Summary
  12. Chapter 6: Additional JavaFX Controls
    1. Controls with a Data Model
      1. ComboBox
      2. ListView
      3. TableView
      4. TreeView
      5. TreeTableView
      6. Sorting and Filtering Data
    2. Controls That Act as Containers
    3. Additional Controls
    4. HTMLEditor
      1. DatePicker
      2. ColorPicker
    5. An Interview with Jonathan Giles, Engineer on the JavaFX Team, Oracle
    6. Summary
  13. Chapter 7: Additional JavaFX Nodes
    1. Charts
    2. WebView
      1. Canvas
    3. ImageView
    4. MediaView
    5. Summary
  14. Chapter 8: Integrating JavaFX, Swing, and SWT
    1. Combining JavaFX and Swing
    2. Using the JFXPanel
      1. Using the SwingNode
      2. Using the Experimental Single-Thread Mode
      3. Pros and Cons of the Integration
    3. Combining JavaFX and SWT
      1. Using the FXCanvas
    4. Summary
  15. Chapter 9: Styling a Control
    1. Using Themes to Style an Application
    2. CSS Basics
    3. CSS in JavaFX
      1. Using Selectors
      2. Summary of the Cascading Feature
      3. Styling a Chart
      4. Best Practices for Styling Applications and Controls
    4. An Interview with Claudine Zillmann, software developer at maredit GmbH
    5. Summary
  16. Chapter 10: Custom Controls
    1. The Structure of a Control
      1. The Skin
      2. The SkinBase Class
    2. Creating a Custom Control
      1. Adding Event Handling
      2. Styling the Control
    3. An Interview with Gerrit Grunwald, Canoo Engineering
    4. Summary
  17. Appendix: JavaFX Resources and Where to Go from Here
    1. Make Your UI Shine
    2. JavaFX-Related Middleware and Application Frameworks
      1. DataFX
      2. OpenDolphin
    3. Best of Open Source Projects
    4. Important JavaFX Links
    5. JavaFX Books
    6. JavaFX Application
    7. Summary
  18. Index