One of the very interesting and useful platforms for JavaFX is touch enabled devices such as Windows 8 tablets. This session will demonstrate a variety of JavaFX applications running on a Surface Windows 8 Pro, pointing out capabilities in JavaFX designed to leverage touch capabilities.
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Scratching the Surface with JavaFX
1. Scratching the Surface
with JavaFX
Jim Weaver
Java Technology Ambassador
Oracle Corporation
@JavaFXpert
james.weaver@oracle.com
2. Multi-touch
considerations
for JavaFX
Touch Gestures
– Swipe, Scroll, Rotate, Zoom
Touch Event and Touch Points
The Pagination Control
Accommodating Fingers
Introduction to JavaFX 3D
Example app: ZenGuitar3D
3. 3
Please note
The following is intended to outline our general product
direction. It is intended for information purposes only, and
may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing
decisions. The development, release, and timing of any
features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.
8. The Scroll Gesture
User turns mouse wheel, drags finger on
touch screen, etc.
Scroll events are continuously generated,
containing x/y position-related info
Events are pixel-based or character/line-
based
If inertia is supported, scroll events may
be generated after user quits scrolling
12. The Zoom Gesture
User typically drags two fingers apart or
closer together
Zoom events are continuously generated,
containing zoom factor-related info
14. Touch Event and Touch Points
Thomas Laenner - http://thomas.laenner.dk/
15. Handling Touch (TouchEvent/TouchPoint)
A TouchEvent contains information about
a touch, including:
– Event type: Pressed, released, moved, or
stationary
– Touch points: The TouchPoint instances
that represent each of the points that were
touched
Each TouchEvent has a unique ID to identify the
events and touch points in a multi-touch action
17. A Touch Demo from the JavaFX Community
Touchyfxy app by Danno Ferrin http://speling.shemnon.com/
Touchfxy is an open source JavaFX
application developed by Danno Ferrin to
demonstrate gestures and touch events
To obtain Touchfxy, see Danno’s blog at
http://speling.shenmon.com
19. Using the Pagination Control
The Pagination control is used for
navigation between pages
Each page is a Node subclass
Numeric page indicators, or bullet-style
indicators, may be set with the style class
STYLE_CLASS_BULLET
22. Making UI Controls Larger for Touching
The default sizes for
JavaFX UI controls are
conducive to using a
mouse as a pointing device
An easy way to modify the
default sizes is to use CSS
23. Making UI Controls Larger for Touching
Specify an -fx-font-size
property in the #root selector
46. 46
ZenGuitar3D Uses the JFugue5 Library
■ An open-source Java API for
programming music without the
complexities of MIDI
■ Developed by David Koelle
■ Available at http://JFugue.org