Atnaujinkite slapukų nuostatas

El. knyga: JavaFX 9 by Example

  • Formatas: PDF+DRM
  • Išleidimo metai: 06-Sep-2017
  • Leidėjas: APress
  • Kalba: eng
  • ISBN-13: 9781484219614
Kitos knygos pagal šią temą:
  • Formatas: PDF+DRM
  • Išleidimo metai: 06-Sep-2017
  • Leidėjas: APress
  • Kalba: eng
  • ISBN-13: 9781484219614
Kitos knygos pagal šią temą:

DRM apribojimai

  • Kopijuoti:

    neleidžiama

  • Spausdinti:

    neleidžiama

  • El. knygos naudojimas:

    Skaitmeninių teisių valdymas (DRM)
    Leidykla pateikė šią knygą šifruota forma, o tai reiškia, kad norint ją atrakinti ir perskaityti reikia įdiegti nemokamą programinę įrangą. Norint skaityti šią el. knygą, turite susikurti Adobe ID . Daugiau informacijos  čia. El. knygą galima atsisiųsti į 6 įrenginius (vienas vartotojas su tuo pačiu Adobe ID).

    Reikalinga programinė įranga
    Norint skaityti šią el. knygą mobiliajame įrenginyje (telefone ar planšetiniame kompiuteryje), turite įdiegti šią nemokamą programėlę: PocketBook Reader (iOS / Android)

    Norint skaityti šią el. knygą asmeniniame arba „Mac“ kompiuteryje, Jums reikalinga  Adobe Digital Editions “ (tai nemokama programa, specialiai sukurta el. knygoms. Tai nėra tas pats, kas „Adobe Reader“, kurią tikriausiai jau turite savo kompiuteryje.)

    Negalite skaityti šios el. knygos naudodami „Amazon Kindle“.

Create media-rich client applications using JavaFX 9 and the Java 9 platform. Learn to create GUI-based applications for mobile devices, desktop PCs, and even the web. Incorporate media such as audio and video into your applications. Interface with hardware devices such as Arduino and Leap Motion. Respond to gesture control through devices such as the Leap Motion Controller. Take advantage of the new HTTP2 API to make RESTful web requests and WebSockets calls.

New to this edition are examples of creating stylized text and loading custom fonts, guidance for working with Scene Builder to create visual layouts, and new content on developing iOS and Android applications using Gluon mobile. The book also covers advanced topics such as custom controls, JavaFX 3D, gesture devices, printing, and animation. Best of all, the book is full of working code that you can adapt and extend to all your future projects.

Is your goal to develop visually exciting applications in the Java lan

guage? Then this is the book you want at your side. JavaFX 9 by Example is chock-full of engaging, fun-to-work examples that bring you up to speed on the major facets of JavaFX 9. You'll learn to create applications that look good, are fun to use, and that take advantage of the medium to present data of all types in ways that engage the user and lead to increased productivity. The book:

  • Has been updated with new content on modular development, new APIs, and an example using the Scene Builder tool
  • Is filled with fun and practical code examples that you can modify and drop into your own projects
  • Includes an example using Arduino and an accelerometer sensor to track motion in 3D
  • Helps you create JavaFX applications for iOS and Android devices
What You'll Learn

  • Work with touch-based interfaces
  • Interpret gesture-based events
  • Use shapes, color, text, and UI controls
  • animation to create a simple click and point game
  • Add audio and video to your projects
  • Utilize JavaFX 3D
  • Create custom controls using CSS, SVG, and Canvas APIs
  • Organize code into modules using Java Platform Module System (Project Jigsaw)

  • Who This Book Is For

    Java developers developing visual and media-rich applications to run on PCs, phones, tablets, Arduino controllers, and more. This includes developers tasked with creating visualizations of data from statistical analysis and from sensor networks. Any developer wanting to develop a polished user-interface in Java will find much to like in this book.
    About the Authors xix
    About the Technical Reviewer xxi
    Acknowledgments xxiii
    Introduction xxv
    Chapter 1 Getting Started
    1(46)
    Downloading Required Software
    1(2)
    Installing the Java 9 Development Kit
    3(11)
    Installing the JDK on Microsoft Windows
    3(4)
    Installing the JDK on MacOS X
    7(4)
    Installing the JDK on Linux
    11(3)
    Setting Environment Variables
    14(8)
    Setup Windows Environment Variables
    16(3)
    Setting Up MacOS X/Linux Environment Variables
    19(3)
    Installing Gradle
    22(1)
    Installing the NetBeans IDE
    23(6)
    Creating a JavaFX HelloWorld Application
    29(12)
    Using the NetBeans IDE
    30(4)
    Using an Editor and the Terminal (the Command-Line Prompt)
    34(4)
    Using Gradle on the Command-Line Prompt
    38(3)
    Walking Through the HelloWorld Source Code
    41(2)
    JavaFX Scene Graph
    42(1)
    JavaFX Node
    42(1)
    Packaging a JavaFX Application
    43(1)
    Downloading the Book's Source Code
    44(1)
    Summary
    45(2)
    Chapter 2 JavaFX and Jigsaw
    47(22)
    What Is Project Jigsaw?
    48(4)
    Benefits
    48(1)
    Drawbacks
    49(1)
    Java 9 Migration Path
    49(3)
    History
    52(3)
    JAR Hell
    52(1)
    OSGi
    53(1)
    Maven/Gradle
    54(1)
    Getting Started
    55(8)
    What Is the Module Path?
    56(1)
    Module Definition
    57(1)
    Module Types
    58(5)
    An Example HelloWorld JavaFX 9 Modular Application
    63(5)
    Create Project Structure
    63(1)
    Create a Module Definition
    63(1)
    Create Main Application Code
    64(1)
    Compile Code (Module)
    65(1)
    Copy Resources
    65(1)
    Run Application
    66(1)
    Package Application as JAR
    66(1)
    Run Application as JAR
    67(1)
    Display Module Description
    67(1)
    Summary
    68(1)
    Chapter 3 JavaFX Fundamentals
    69(34)
    JavaFX Lines
    69(5)
    Drawing Lines
    74(4)
    Drawing Shapes
    78(1)
    Drawing Complex Shapes
    79(9)
    A Complex Shape Example
    79(4)
    The Cubic Curve
    83(1)
    The Ice Cream Cone
    84(2)
    The Smile
    86(1)
    The Donut
    86(2)
    Painting Colors
    88(7)
    An Example of Color
    88(4)
    Gradient Color
    92(1)
    Stop Color
    92(1)
    Linear Gradient
    92(1)
    Radial Gradient
    93(1)
    Semitransparent Gradients
    94(1)
    Reflective Cycle Gradients
    94(1)
    Drawing Text
    95(6)
    Changing Text Fonts
    97(3)
    Applying Text Effects
    100(1)
    Summary
    101(2)
    Chapter 4 Lambdas and Properties
    103(32)
    Lambda
    103(4)
    Lambda Expressions
    104(3)
    Functional Interfaces
    107(1)
    Aggregate Operations
    108(3)
    Default Methods
    111(6)
    An Example Case: Cats Large and Small
    111(1)
    Code for the Example
    112(4)
    Explanation of the Code
    116(1)
    Properties and Binding
    117(5)
    Ul Patterns
    117(1)
    Properties
    117(1)
    Types of JavaFX Properties
    118(2)
    JavaFX JavaBean
    120(1)
    Property Change Support
    121(1)
    Binding
    122(2)
    Bidirectional Binding
    123(1)
    High-Level Binding
    123(1)
    Low-Level Binding
    124(1)
    A Logon Dialog Example
    124(10)
    Login Dialog Source Code
    126(4)
    Explanation of the Code
    130(4)
    Summary
    134(1)
    Chapter 5 Layouts and Scene Builder
    135(36)
    Layouts
    135(15)
    HBox
    136(4)
    VBox
    140(4)
    FlowPane
    144(1)
    BorderPane
    144(1)
    GridPane
    145(5)
    Scene Builder
    150(20)
    Download and Installing Scene Builder
    151(1)
    Launching Scene Builder
    151(18)
    A Code Walkthrough
    169(1)
    Summary
    170(1)
    Chapter 6 User Interface Controls
    171(56)
    Labels
    171(14)
    Custom Fonts
    173(1)
    Fonts as Icons
    174(1)
    Example: Working with Third-Party Font Packs as Icons
    174(7)
    How It Works
    181(4)
    Buttons
    185(13)
    Button
    185(1)
    Check Box
    186(1)
    Hyperlink
    187(1)
    Radio Button
    187(2)
    Example: Button Fun
    189(1)
    Button Fun Instructions
    189(1)
    Source Code of ButtonFun.java
    190(6)
    How It Works
    196(2)
    Menus
    198(6)
    Creating Menus and Menu Items
    198(1)
    Invoking a Selected Menultem
    199(1)
    Example: Working with Menus
    200(2)
    How It Works
    202(1)
    Additional Ways to Select Menus and Menu Items
    203(1)
    The ObservableList Collection Class
    204(1)
    Working with ListViews
    204(5)
    Example: Hero Picker
    205(3)
    How It Works
    208(1)
    Working with TableViews
    209(12)
    What Is a Cell Factory?
    209(1)
    Making Table Cells Editable
    210(2)
    Example: Bosses and Employees Working with Tables
    212(9)
    Generating a Background Process
    221(5)
    Creating a Background Task
    221(1)
    Example: File Copy Progress Dialog (BackgroundProcesses)
    222(3)
    How It Works
    225(1)
    Summary
    226(1)
    Chapter 7 Graphics
    227(38)
    Working with Images
    227(4)
    Loading Images
    228(2)
    Displaying Images
    230(1)
    A Photo Viewer Example
    231(24)
    Features/Instructions
    231(2)
    UML: Class Diagram
    233(1)
    File Descriptions
    234(1)
    Source Code
    235(20)
    Animation
    255(2)
    What Are Key Values?
    255(1)
    What Are Keyframes?
    255(1)
    What Is a Timeline?
    256(1)
    JavaFX Transition Classes
    256(1)
    Point-and-Click Game Example
    257(4)
    Source Code
    257(4)
    How It Works
    261(1)
    Compound Transitions
    261(1)
    PhotoViewer2 Example
    262(2)
    Summary
    264(1)
    Chapter 8 JavaFX Printing
    265(18)
    JavaFX Printing
    265(3)
    JavaFX Print APIs
    268(1)
    Printer and Printer Job
    268(6)
    Query Printer Attributes
    270(2)
    Configuring a Print Job
    272(2)
    Printing a Web Page
    274(1)
    Example WebDocPrinter Application
    275(7)
    Source Code
    277(4)
    How Does It Work?
    281(1)
    Summary
    282(1)
    Chapter 9 Media and JavaFX
    283(44)
    Media Events
    283(2)
    Playing Audio
    285(29)
    An MP3 Player Example
    285(2)
    MP3 Audio Player Source Code
    287(14)
    How It Works
    301(13)
    Playing Video
    314(9)
    MPEG-4
    314(1)
    VP6 .flv
    314(1)
    A Video Player Example
    315(1)
    Video Player Source Code
    316(4)
    How It Works
    320(3)
    Simulating Closed Captioning: Marking a Position in a Video Media
    323(2)
    Closed Captioning Video Example
    323(2)
    How It Works
    325(1)
    Summary
    325(2)
    Chapter 10 JavaFX on the Web
    327(40)
    JavaFX Web and HTTP2 APIs
    328(2)
    Web Engine
    330(1)
    WebEngine's load() Method
    330(1)
    WebEngine's loadContent() Method
    331(1)
    HTML DOM Content
    331(34)
    Obtaining an org.w3c.dom.Document (DOM) Object
    331(1)
    Using Raw XML Content as a String
    332(1)
    The JavaScript Bridge
    332(1)
    Communicating from Java to JavaScript
    333(1)
    Communicating from JavaScript to Java
    333(2)
    Java 9 Module jdk.incubator.httpclient
    335(4)
    Making RESTful Requests
    339(1)
    The HTTP GET Request
    340(1)
    HTTP POST Request
    341(1)
    WebSockets
    342(3)
    Viewing HTML5 Content (WebView)
    345(1)
    Example: An HTML5 Analog Clock
    345(1)
    Analog Clock Source Code
    346(3)
    How It Works
    349(1)
    Inkscape and SVG
    349(1)
    WebEvents
    350(1)
    Weather Widget Example
    351(2)
    One-Liner: Reading an Input Stream into a String
    353(1)
    Source Code
    354(9)
    How It Works
    363(1)
    Enhancements
    364(1)
    Summary
    365(2)
    Chapter 11 JavaFX 3D
    367(24)
    Basic 3D Scenes in JavaFX
    367(2)
    A Very Basic 3D Scene Example
    367(2)
    Primitives
    369(1)
    Adding a Primitive Example
    369(5)
    Simple Translate and Rotate Example
    371(1)
    Multiple Primitive Transformation Example
    372(1)
    All Together Now: Grouped Primitives
    373(1)
    Interacting with Your Scene
    374(5)
    Primitive Picking for Primitives
    375(1)
    First Person Movement Using the Keyboard
    376(1)
    First Person Camera Movement Using the Mouse
    377(2)
    Beyond the Basics
    379(11)
    Custom 3D Objects Using the TriangleMesh Class
    380(1)
    "Winding" and Wuthering
    380(3)
    MeshViews and DrawMode
    383(5)
    Roll Camera!
    388(1)
    Hit the Lights
    389(1)
    Summary
    390(1)
    Chapter 12 JavaFX and Arduino
    391(40)
    The Arduino Board
    391(2)
    Programming the Arduino
    393(8)
    Arduino Web Editor
    394(2)
    Arduino IDE
    396(1)
    Windows
    396(2)
    MacOS X or Linux
    398(1)
    Running the IDE
    398(2)
    The Blink Example
    400(1)
    Orientation Visualizer Example
    401(5)
    How It Works
    406(1)
    Serial Reading
    406(1)
    Java Simple Serial Connector
    406(1)
    JavaFX, the Charting API, and Orientation
    406(24)
    Creating the Module Project
    407(2)
    Serial Communications
    409(3)
    How It Works
    412(2)
    Testing Serial Comms
    414(1)
    The JavaFX Charts API
    414(6)
    Building and Running the Project
    420(1)
    How It Works
    421(4)
    Adding More Functionality
    425(2)
    Building and Running the Project
    427(1)
    How It Works
    428(2)
    More Examples
    430(1)
    Summary
    430(1)
    Chapter 13 JavaFX on Mobile
    431(36)
    JavaFXPorts: The Port to Mobile
    431(2)
    JavaFXPorts Under the Hood
    431(1)
    Getting Started with JavaFXPorts
    432(1)
    Hello Mobile World Example
    433(5)
    How Does It Work?
    435(2)
    Submitting the App to the Stores
    437(1)
    Gluon Mobile
    438(3)
    The Gluon IDE Plug-Ins
    438(1)
    Charm Glisten
    439(2)
    License
    441(1)
    Example: The BasketStats App
    441(24)
    Creating the Project
    441(6)
    Adding the Model
    447(3)
    Adding the Service
    450(3)
    Modifying the Main View
    453(4)
    Modifying the Board View
    457(7)
    Deploy to Mobile
    464(1)
    More Examples
    465(1)
    Summary
    465(2)
    Chapter 14 JavaFX and Gestures
    467(24)
    Recognizing Gestures in Your Application
    467(2)
    Example: Animating Shapes Along a Path Using Touch Events
    469(4)
    How Does It Work?
    472(1)
    Touching, Rotating, and Zooming in 3D
    473(3)
    The Leap Motion Controller
    476(13)
    How It Works
    477(1)
    Getting Started with the Leap SDK
    478(1)
    Adding the Leap SDK to a JavaFX Project
    479(1)
    The Hands Tracking Example
    479(1)
    The LeapListener Class
    480(3)
    The 3D Model Classes
    483(2)
    The Application Class
    485(2)
    Building and Running the Project
    487(2)
    More Examples
    489(1)
    Summary
    489(2)
    Chapter 15 Custom UIs
    491(34)
    Theming
    491(14)
    Native Look and Feels
    493(2)
    Web and Mobile Look and Feels
    495(2)
    Applying the JavaFX CSS Theme
    497(3)
    An Example of Switching Themes
    500(5)
    JavaFX CSS Styling
    505(8)
    What Are Selectors?
    506(5)
    How to Define -fx- Based Styling Properties (Rules)
    511(1)
    Obeying the JavaFX CSS Rules
    512(1)
    Custom Controls
    513(10)
    The LED Custom Control
    514(1)
    Structure of the LED Custom Control Example Code
    515(1)
    The Properties of the LED Control
    516(3)
    The Initialization Code of the LED Control
    519(4)
    Other Ways to Create a Custom Control
    523(1)
    Summary
    523(2)
    Chapter 16 Appendix A: References
    525(26)
    Java 9 SDK
    525(1)
    Java 9 API Documentation
    525(1)
    Java 9 Features
    525(1)
    Java 9 Jigsaw
    526(1)
    IDEs
    526(1)
    Deploying Applications
    526(1)
    JavaFX 2D Shapes
    527(1)
    JavaFX Color
    527(1)
    JavaFX 2.x Builder Classes
    527(1)
    JavaFX Printing
    527(1)
    Project Lambda
    528(1)
    Nashorn
    529(1)
    Properties and Bindings
    529(1)
    Layouts
    530(1)
    JavaFX Tools
    530(1)
    Enterprise GUI Frameworks
    531(1)
    Domain-Specific Languages
    532(1)
    Custom UIs
    532(3)
    Operating System Style Guidelines
    535(1)
    JavaFX Media
    535(1)
    JavaFX on the Web
    536(1)
    JavaFX 3D
    537(1)
    JavaFX Gaming
    538(1)
    Java IoT and JavaFX Embedded
    539(1)
    Software and Device Manufacturers
    540(1)
    JavaFX Communities
    540(1)
    Applications
    541(2)
    Java/JavaFX Books and Magazines
    543(1)
    Author Blogs
    544(1)
    Tutorials, Courses, Consulting Firms, and Demos
    544(1)
    Tools, Applications, and Libraries
    545(2)
    Videos and Presentations on JavaFX
    547(4)
    Index 551
    Carl P. Dea is a principal software engineer. He has been developing software for over 20 years, for many clients from Fortune 500 companies to nonprofit organizations. He has written software ranging from mission-critical applications to ecommerce-based Web applications. His passion for software development started when his middle school science teacher showed him a TRS-80 computer. Carl has been using Java since the very beginning, and he has been a huge JavaFX enthusiast since the early days when it was its own language called JavaFX script. His current software development interests are UI/UX, game programming, data visualizations, embedded systems, smartphones, AI, and robotics. When Carl is not working, he and his wife enjoy canoeing and day trips to the beach. Carl and his wife are proud parents of their younger daughter who attends Salisbury University. Carl and his wife are also proud of their older daughter, who is a high school teacher in Anne Arundel countyMaryland. Carl lives in Pasadena, Maryland, USA. Gerrit Grunwald is a software engineer with more than 10 years of experience in software development. He has been involved in development of Java desktop applications and controls. His current interests include JavaFX, HTML5, and Swing, especially development of custom controls in these technologies. Gerrit is also interested in Java-driven embedded technologies like JavaSE Embedded on Raspberry Pi, i.MX6, BeagleBone Black, CubieBoard2, and similar devices. He is a true believer in open source software and has participated in popular projects like JFXtras.org as well as his own projects (Enzo, SteelSeries Swing, SteelSeries Canvas). Gerrit is an active member of the Java community, where he founded and leads the Java User Group Münster (Germany), co-leads the JavaFX and IoT community at Oracle, and is a JavaOne RockStar and Java Champion. He is a speaker at conferences and user groups internationally.José Pereda, PhD in Structural Engineering, works as a software engineer at Gluon. Being on Java since 1999, he is a JavaFX advocate, developing JavaFX applications for mobile platforms and embedded platforms. He also works on open source projects, co-authoring a JavaFX book (JavaFX 8 Introduction by Example), blogging, tweeting, and speaking at conferences (such as JavaOne, JAX, Jfokus, JavaLand, CodingSerbia). José lives with his wife and four kids in Valladolid, Spain.

    Sean M. Phillips is a Java Software Architect currently working on ground systems for Space Science missions at the NASA Goddard Space Flight Center. He has developed embedded systems, and modeling, simulation, and visualization software for projects from commercial & military RADAR, heavy manufacturing, Battlespace Awareness, and Orbital Flight Dynamics. Sean is the lead developer of F(X)yz, a free third-party library for JavaFX 3D components and data visualization tools. Sean enjoys sharing his experiments through blog entries on various sites, including Java.net, and The NetBeans DZone. Sean lives in Bowie, Maryland, USA with his very supportive wife Zulma and sons Sebastian and Sean Alexander. Mark Heckler is a Principal Technologist & Developer Advocate at Pivotal, a conference speaker, and published author focusing on software development for the Internet of Things and the Cloud. He has worked with key players in the manufacturing, retail, medical, scientific, telecom, and financial industries, and with various public sector organizations to develop and deliver critical capabilities on time and on budget. Mark is an open source contributor, and author/curator of a developer-focused blog. Mark lives with his very understanding wife, three kids, and dog in St. Louis, Missouri, USA.