Tài liệu JavaFX™ Script - Dynamic Java™ Scripting for Rich Internet/Client-Side Applications

Thảo luận trong 'Lập Trình' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    167
    Điểm thành tích:
    0
    Xu:
    0Xu
    About the Authors vii
    About the Technical Reviewer . ix
    Acknowledgments xi
    ■CHAPTER 1 Introduction to JavaFX 1
    The JavaFX Family . 1
    JavaFX Mobile 1
    JavaFX Script 1
    JavaFX Script's Relationship to Java . 2
    Features and Advantages of JavaFX Script . 2
    Current Status of JavaFX Script . 3
    Getting the Most from This Book 3
    Summary 3
    Resources . 4
    ■CHAPTER 2 Quick Start . 5
    Choosing a JavaFX Development Environment 5
    Obtaining JavaFXPad . 6
    Obtaining an IDE Plug-In 6
    The Eclipse Plug-In 7
    The NetBeans Plug-In 7
    Your First JavaFX Application: HelloJFX . 7
    Understanding the HelloJFX Application . 9
    Comments 10
    The package Declaration . 10
    import Statements 10
    Declarative Code That Defines the User Interface . 11
    Using the Frame Class . 12
    Creating String Literals 13
    Using the Canvas GUI Widget 13
    Drawing Text 13
    Defining Fonts . 14
    Running and Examining the HelloJFXBind Application 15
    Structure of a Minimal JavaFX Class 17
    The class Declaration 17
    Making an Instance of the Class . 18
    Declaring and Assigning Variables 18
    Understanding Binding . 19
    Assigning Color Constants to the Text Object 20
    Assigning an Array of Values to an Attribute . 21
    Moving the HelloJFXModel Class into Its Own File 22
    Special Instructions for Running This Example with JavaFXPad 24
    Summary . 26
    Resources 27
    ■CHAPTER 3 Creating User Interfaces in JavaFX . 29
    Overview of the Word Search Builder Application . 29
    Invoking the Application 30
    A Tour of the Application . 31
    The Word Search Builder Application Architecture 36
    The Declarative Code and Classes in the
    wordsearch_jfx.ui Package . 37
    The Classes in the wordsearch_jfx.model Package . 38
    Creating the Frame and Menu Structure 39
    The Exoskeleton of the Word Search Builder UI . 39
    Creating Menus 45
    Creating a MenuBar Widget . 46
    Creating Menu Widgets 47
    Creating MenuItem Widgets . 48
    Creating CheckBoxMenuItem Widgets . 49
    Visually Separating Menu Items 50
    Table of Menu-Related Widgets 50
    Invoking Java Methods from JavaFX 51
    Instantiating the Model, Handler, and View Classes . 53
    Using Borders . 55
    Understanding JavaFX Layout Widgets . 62
    Using the GridPanel Layout Widget 62
    Using the Box Layout Widget 64
    Using the BorderPanel Layout Widget 65
    The Layout Widget Types . 66
    Creating a ToolBar 69
    Using Button Widgets on a Toolbar 71
    Summary . 77
    Resources 78
    ■CHAPTER 4 Creating JavaFX Classes and Objects 81
    Testing the Word Search Builder Model 81
    Understanding the Structure of a JavaFX Class 87
    Understanding Attribute Initializers 87
    Introducing Triggers . 88
    Defining the Body of an Operation 88
    Producing Console Output 89
    Creating String Expressions . 90
    Invoking an Operation Located in the Same Class 90
    The for Statement 90
    Examining the Model Behind the Word Search Grid . 94
    Understanding JavaFX Data Types . 107
    Considerations When Declaring an Attribute 108
    Considerations When Declaring a var . 110
    Defining and Using Named Instances (Constants) 111
    Creating Operations and Functions 112
    Defining the Parameters and Return Type of an Operation . 112
    Understanding the Effects of the new Operator . 114
    Creating JavaFX Functions . 116
    Understanding JavaFX Triggers . 116
    Using JavaFX Statements and Operators 117
    The if/else Statement . 118
    The while Statement . 119
    The break Statement . 120
    Using JavaFX Sequences 127
    Sequence Literals . 130
    Accessing a Specific Element of a Sequence . 131
    Iterating Over an Sequence 132
    Inserting Sequence Elements . 132
    Querying Sequences . 133
    Deleting Sequence Elements . 134
    Zeroing Out a Sequence 135
    The JavaFX Statements . 136
    The JavaFX Operators 137
    The Model Behind Each Word Search Grid Cell 139
    The Model Behind the Word List Boxes 141
    Naming Rules and Conventions for JavaFX Identifiers 143
    Summary 144
    Resources . 145
    ■CHAPTER 5 More UI Fun Including 2D Drawing 147
    Understanding JavaFX 2D Graphic . 147
    Drawing and Painting Shapes 149
    Transforming Graphics Objects . 150
    Using the Group Node to Group Shapes Together 150
    Canvas Mouse Events 155
    Using the var Pseudo-Attribute . 157
    Creating Custom Graphical Components 158
    Extending CompositeNode . 162
    Working with Images on the Canvas . 163
    Controlling the Opacity of a Node 164
    Animating a Node . 165
    Using a Custom Component in a Program . 165
    Examining the WordGridView
    Custom Graphical Component 166
    Using the PopupMenu Widget 175
    Creating Custom Widgets 179
    Supplying a composeWidget() Operation 181
    Creating and Using the ListBox Widget 181
    Creating Dialog Boxes 182
    Using the JavaFX MessageDialog Class . 192
    Using the Java Swing JOptionPane Class 192
    Using the JavaFX Dialog Class 194
    Experiencing the GroupPanel Layout . 198
    Using the RadioButton Widget 198
    More JavaFX UI Components . 198
    Summary 199
    Resources . 200
    vi ■CONTENTS
     

    Các file đính kèm:

Đang tải...