Source Code for the UI Components Tutorials (Release 8) (original) (raw)
JavaFX: Working with JavaFX UI Components
The following tables list the demo applications in this document with their associated source code files.
UI Control Samples
Chart Samples
CSS Samples
Text Samples
Table of Contents
JavaFX: Working with JavaFX UI Components
- Title and Copyright Information
- Preface
- Part I About This Tutorial
- Part II Using JavaFX UI Controls
- 2 Label
* Creating a Label
* Setting a Font
* Wrapping Text
* Applying Effects - 3 Button
* Creating a Button
* Assigning an Action
* Applying Effects
* Styling a Button - 4 Radio Button
* Creating a Radio Button
* Adding Radio Buttons to Groups
* Processing Events for Radio Buttons
* Requesting Focus for a Radio Button - 5 Toggle Button
* Creating a Toggle Button
* Adding Toggle Buttons to a Group
* Setting the Behavior
* Styling Toggle Buttons - 6 Checkbox
* Creating Checkboxes
* Defining a State
* Setting the Behavior - 7 Choice Box
* Creating a Choice Box
* Setting the Behavior for a Choice Box
* Applying a Tooltip - 8 Text Field
* Creating a Text Field
* Building the UI with Text Fields
* Processing Text Field Data - 9 Password Field
* Creating a Password Field
* Evaluating the Password - 10 Scroll Bar
* Creating a Scroll Bar
* Using a Scroll Bar in Your Application - 11 Scroll Pane
* Creating a Scroll Pane
* Setting the Scroll Bar Policy for a Scroll Pane
* Resizing Components in the Scroll Pane
* Sample Application with a Scroll Pane - 12 List View
* Creating a List View
* Populating a List View with Data
* Customizing the Content of a List View
* Processing the List Item Selection - 13 Table View
* Creating a Table
* Defining the Data Model
* Adding New Rows
* Sorting Data in Columns
* Editing Data in the Table
* Adding Maps of Data to the Table - 14 Tree View
* Creating Tree Views
* Implementing Cell Factories
* Adding New Tree Items on Demand
* Using Tree Cell Editors - 15 Tree Table View
* Creating a TreeTableView control
* Adding Several Columns
* Altering Visual Appearance
* Managing Selection Mode - 16 Combo Box
* Creating Combo Boxes
* Editable Combo Boxes
* Applying Cell Factories to Combo Boxes - 17 Separator
* Creating a Separator
* Adding Separators to the UI of Your Application
* Styling Separators - 18 Slider
* Creating a Slider
* Using Sliders in Graphical Applications - 19 Progress Bar and Progress Indicator
* Creating Progress Controls
* Indicating Progress in Your User Interface - 20 Hyperlink
* Creating a Hyperlink
* Linking the Local Content
* Linking the Remote Content - 21 HTML Editor
* Adding an HTML Editor
* Using an HTML Editor to Build the User Interface
* Obtaining HTML Content - 22 Tooltip
* Creating a Tooltip
* Presenting Application Data in Tooltips - 23 Titled Pane and Accordion
* Creating Titled Panes
* Adding Titled Panes to an Accordion
* Processing Events for an Accordion with Titled Panes - 24 Menu
* Building Menus in JavaFX Applications
* Creating a Menu Bar
* Adding Menu Items
* Creating Submenus
* Adding Context Menus - 25 Color Picker
* Design Overview
* Color Chooser
* Color Palette
* Custom Color Dialog Window
* Using a Color Picker
* Changing the Appearance of a Color Picker - 26 Date Picker
* Working with Time Data and Date Formats
* Date Picker Design Overview
* Adding a Date Picker to an Application UI
* Customizing the Date Picker
* Altering the Calendar System - 27 Pagination Control
* Creating a Pagination Control
* Implementing Page Factories
* Styling a Pagination Control - 28 File Chooser
* Opening Files
* Configuring a File Chooser
* Setting Extension Filters
* Saving Files - 29 Customization of UI Controls
* Applying CSS
* Altering Default Behavior
* Implementing Cell Factories - 30 UI Controls on the Embedded Platforms
* Embedded Runtime Features
* Support for Touch-Enabled Devices
* Virtual Keyboard
* Appearance of UI Controls on Embedded Platforms
* Scrolling Controls
* Text Input Controls
* Context Menus
* UI Controls Features Available on the Embedded Platforms
* UI Controls Features That Are Not Available on Embedded Touch Platforms
* Other Features That Are Not Available on Embedded Touch Platforms
- 2 Label
- Part III Working with JavaFX Charts
- 31 Pie Chart
* Creating a Pie Chart
* Setting a Pie Chart and a Legend
* Processing Events for a Pie Chart - 32 Line Chart
* Chart Settings
* Chart Data
* Creating a Line Chart
* Creating Categories for a Line Chart
* Adding Series to the Line Chart - 33 Area Chart
* Creating an Area Chart
* Creating a Stacked Area Chart
* Setting Axis and Tick Properties
* Adding Negative Values
* Styling Area Charts - 34 Bubble Chart
* Creating a Bubble Chart
* Using the Extra Value Property
* Changing the Appearance Visual Setting of the Plot and Tick Marks - 35 Scatter Chart
* Creating a Scatter Chart
* Managing Chart Data
* Adding Effects to Charts
* Changing the Chart Symbol - 36 Bar Chart
* Creating a Bar Chart
* Horizontal Bar Chart
* Creating a Stacked Bar Chart
* Animating Data in Charts
- 31 Pie Chart
- Part IV Skinning JavaFX Applications with CSS
- 37 Styling UI Controls with CSS
* Default Style Sheet
* Creating Style Sheets
* Defining Styles
* Selectors
* Rules and Properties
* Skinning the Scene
* Skinning Controls
* Overriding Default Styles
* Creating Class Styles
* Creating ID Styles
* Setting Styles in the Code
* Additional Resources - 38 Styling Charts with CSS
* Modifying Basic Chart Elements
* Altering Colors of the Chart Plot
* Setting the Axes
* Setting Chart Colors
* Changing Chart Symbols
- 37 Styling UI Controls with CSS
- Part V Working with Text in JavaFX Applications
- 39 Using Text in JavaFX
* Introduction
* Adding Text
* Setting Text Font and Color
* Making Text Bold or Italic
* Using Custom Fonts
* Setting LCD Text Support
* Rich Text and Bidirectional Support - 40 Applying Effects to Text
* Perspective Effect
* Blur Effect
* Drop Shadow Effect
* Inner Shadow Effect
* Reflection
* Combining Several Effects
* Application Files
- 39 Using Text in JavaFX
- Part VI Source Code for the UI Components Tutorials
- A UI Control Samples
* LabelSample.java
* ButtonSample.java
* RadioButtonSample.java
* ToggleButtonSample.java
* CheckboxSample.java
* ChoiceBoxSample.java
* TextFieldSample.java
* PasswordField.java
* ScrollBarSample.java
* ScrollPaneSample.java
* ListViewSample.java
* TableViewSample.java
* TreeViewSample.java
* TreeTableViewSample.java
* ComboBoxSample.java
* SeparatorSample.java
* SliderSample.java
* ProgressSample.java
* HyperlinkSample.java
* HyperlinkWebViewSample.java
* HTMLEditorSample.java
* TooltipSample.java
* TitledPaneSample.java
* MenuSample.java
* ColorPickerSample.java
* DatePickerSample.java
* PaginationSample.java
* FileChooserSample.java - B Chart Samples
* PieChartSample.java
* LineChartSample.java
* AreaChartSample.java
* BubbleChartSample.java
* ScatterChartSample.java
* BarChartSample.java - C CSS Samples
* DownloadButton.java
* DownloadButtonStyle1.css
* DownloadButtonStyle2.css
* StyleStage.java
* UIControlCSS.java
* controlStyle1.css
* controlStyle2.css - D Text Samples
* TextEffects.java
* NeonSign.java
- A UI Control Samples