没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
iii
Contents at a Glance
About the Author.....................................................................................................x
About the Technical Reviewer ...............................................................................xi
Acknowledgments ................................................................................................xii
Introduction .........................................................................................................xiii
Chapter 1: JavaFX Fundamentals ...........................................................................1
Chapter 2: Graphics with JavaFX..........................................................................69
Chapter 3: Media with JavaFX............................................................................111
Chapter 4: JavaFX on the Web............................................................................141
Index ...................................................................................................................175
xiii
Introduction
JavaFX 2.0 is Java’s next generation graphical user interface (GUI) toolkit for developers to rapidly build
rich cross-platform applications. Built from the ground up, JavaFX takes advantage of modern GPUs
through hardware-accelerated graphics while providing well-designed programming interfaces enabling
developers to combine graphics, animation, and UI controls. The new JavaFX 2.0 is a pure Java language
application programming interface (API).
The key architectural strategies provided by JavaFX 2.0 API are the reuse of existing Java
libraries and the bridging of communication between other languages that run on the JVM (Visage,
Jython, Groovy, JRuby, and Scala).
Nandini Ramani of Oracle plainly states the intended direction of JavaFX the platform in the
following excerpt from the screencast, Introducing JavaFX 2.0:
“The industry is moving toward multi-core/multi-threading [type]
platforms with GPUs. JavaFX 2.0 leverages these attributes to improve
execution efficiency and UI design flexibility. Our initial goal is to give
architects and developers of enterprise applications a set of tools and
APIs to help them build better data driven business applications.”
—Nandini Ramani
Oracle Corp.
VP of Development, Java Client Platform
Some History
In 2005, Sun Microsystems acquired the company SeeBeyond, at which a certain software engineer by
the name of Chris Oliver created a graphics-rich scripting language known as F3 (Form Follows
Function). F3 was later unveiled by Sun Microsystems at the 2007 JavaOne conference as JavaFX.
On April 20, 2009 Oracle Corporation announced the acquisition of Sun Microsystems, making
Oracle the new steward of JavaFX. At JavaOne 2010, Oracle announced the JavaFX roadmap. As part of
the road map, Oracle revealed its plans to phase out the JavaFX script language and re-create JavaFX for
the Java language and platform.
As promised based on the 2010 roadmap, JavaFX 2.0 SDK was released at JavaOne October 3,
2011. Oracle also announced its commitment to take steps to release JavaFX as an open-source product,
thus allowing the community to help move the platform forward. Open-sourcing JavaFX will increase its
adoption, enable a quicker turnaround time on bug fixes, and generate new enhancements.
Table 0-1 shows the overall history of the major JavaFX releases.
INTRODUCTION
xiv
Table 0-1. Historical Timeline of Major JavaFX Releases
Release Date Version Platform Description
December 4, 2008 1.0 Windows and MacOS JavaFX Script language,
Production Suite, Media Playback
February 12, 2009 1.1 Windows and MacOS New mobile development
June 2, 2009 1.2 Windows, MacOS, Linux,
Solaris
Skinnable UI controls, Charting
API, and performance
improvements
April 22. 2010 1.3 Windows, MacOS, Linux,
Solaris
JavaFX Composer, TV Emulator,
Mobile Emulator
October 3, 2011 2.0 Windows, MacOS Rewritten for the Java Language
Approach in This Book
The title of the book says it all: JavaFX 2.0 Introduction by Example. In this book, you will be learning the
new JavaFX 2.0 capabilities by following practical recipe examples. These recipes will, in turn, provide
you with the knowledge needed to create your own rich client applications. In the same tone with Java’s
mantra “Write once, run anywhere,” JavaFX also preserves this same sentiment. Because JavaFX 2.0 is
written entirely in Java the language, you will feel right at home.
Most of the recipes can be compiled and run under Java 6. However, some recipes will take
advantage of Java 7’s language enhancements, so Java 7 will be required. While working through this
book with JavaFX 2.0 and Java 7, you will realize that the new APIs and language enhancements will help
you to become a more productive developer. Having said this, I encourage you to explore all of Java 7’s
new capabilities. To delve deeper into the new capabilities of Java 7, I recommend the book, Java 7
Recipes. On an added note, the recipes in this book can also be found in Java 7 Recipes.
This book covers JavaFX 2.0’s fundamentals, graphics and animations, audio and video, and the
Web. The fundamentals include how to install prerequisite software (JavaFX 2.0, NetBeans 7.1) and
create simple user interfaces. You will also learn the basics of the scene graph, text nodes and font styles,
shapes, colors, layouts, menus, UI controls, simple styling (CSS styling), binding expressions,
background processes, keyboard shortcuts, and dialog boxes. Next, in graphics and animations you will
encounter image handling, drag-and-drop operations, animation APIs, and UI theming (Look ‘n’ Feel).
After graphics and animations, you will learn audio and video. This section will include creating an MP3
player, using a video player, responding to media events, handling media marker events, and
synchronizing an animation with media events. Finally, you will be using JavaFX 2.0 to interoperate with
web technologies such as HTML5, JavaScript, and XML. In this section, you will be learning how to
embed JavaFX into a web page, rendering and dynamically manipulating HTML5 content, creating a
weather application to respond to HTML events, and creating an RSS feed application using an
embedded database (Derby).
剩余195页未读,继续阅读
张楚阳
- 粉丝: 1
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页