action property, 168
Adobe Photoshop, 91–93
-agentlib parameter, 278
-agentpath parameter, 278
alpha attribute, 76–77
altDown event, 257
animation
overview, 132
along paths, 139–145
timelines, 133–139
AnimationPath class, 142
applets vs. applications, 38
applications
vs. applets, 38
compiling, 269–273
with swing, 180
Applications tab, 21
ApplyEffects function, 103–104
Bloom effect, 106–108
ColorAdjust effect, 110
DistantLights, 120–121
DropShadow effect, 116–117
GaussianBlur effect, 111
Glow effect, 114–115
InvertMask effect, 119
Perspective Transform, 128
PointLights, 122
SepiaTone effect, 125
SpotLights, 123
Arc attribute, 67
arcHeight attribute, 63–64
arcs, drawing, 65–68
ArcTo function, 141
ArcType attribute, 67
arcWidth attribute, 63–64
arrays, 60
asterisks (*) for comments, 20
attributes
fonts, 32
name-value pairs, 23
Palette, 33
audio files
overview, 201–202
playing, 216–217
autoPlay property, 204, 207–208, 265
autoReverse parameter
PathTransition, 142
Timeline, 138
azimuth parameter, 120
backgroundLoading attribute, 89
balance property, 265
Basic Shapes section, 32
bin folder, 269
bind keyword, 46
binding
inverse, 213–214
string interpolators, 174
Text node, 46–49
black-and-white film effect, 123–126
blocksMouse property, 254
Bloom effect, 106–108
blurring effects, 110–113
blurType parameter, 116
-bootclasspath parameter, 271
boundsIn property, 254
brightness attribute
ColorAdjust effect, 109
HSB color, 76
bufferProgressTime property, 265
Build Project option, 248–249
button event, 257
buttons
horizontal layout, 221–225
nested layouts, 227–230
play/pause, 207–211
RoundButton, 186–192
SwingButton, 166–172
vertical layout, 225–227
cache property, 254
camel casing, 41
Cartesian coordinates
in animation, 141
axes, 33
Cascading Style Sheets (CSS), 234–235
independent style classes, 241–244
packages, 235–238
style creation, 238–239
working with, 239–241
center points for RadialGradients, 81
centerX attribute, 68
centerY attribute, 68
check boxes, 173–176
chord attribute, 67
circles, 66
drawing, 68–69
RadialGradients, 81
classes
extending, 184
-classpath parameter
javafx, 275
javafxc, 271
clickCount event, 257
-client parameter, 274
clip property
description, 254
overriding, 186
SwingButton, 170–172
ClosePath function, 141
code snippets
categories, 18
need for, 25
Stage node, 21–23
colons (:) in attribute values, 55
color, 72
fonts, 238
LinearGradient, 78
lines, 57
mixing, 74–77
polygons, 64
predefined, 72–74
RadialGradients, 81
rectangles, 63
color parameter
DistantLights, 120
DropShadow effect, 116
ColorAdjust effect, 109–110
combining effects, 130
combo boxes, 176–180
command-line environment
javafx, 274–278
javafxc, 269–273
setting up, 268–269
commas (,)
array values, 60
attributes, 55
parameters, 42
comments
adding, 30
CSS, 238
overview, 19–21
process, 21
content.fxd file, 95–96
content property, 223
contrast parameter, 109–110
controlDown event, 257
coordinates
Cartesian, 33
Perspective Transform, 128–129
copyright information in comments, 19
-cp parameter
javafx, 275
javafxc, 271
Create File dialog box, 90
create method for nodes, 193–197
createFromPath function, 142
CSS (Cascading Style Sheets), 234–235
independent style classes, 241–244
packages, 235–238
style creation, 238–239
working with, 239–241
curly braces ({})
for context menus, 54–55
functions, 41–42
string interpolation, 168
type names, 23
currentCount property, 265
currentTime property, 211–212, 266
cursor property, 254
custom nodes, 192–199
-D parameter, 275
-d parameter, 272
-d32 parameter, 274
-d64 parameter, 274
-da parameter, 277
dates in comments, 19–20
Debug option, 31
def keyword, 46
default package names, 15
definitions, function, 104
delimiters, 21
deploying JavaFX, 248–251
-deprecation parameter, 270–271
descriptive comments, 30
desktop profiles, 35–36
{__DIR__} constant, 89–91, 136
disable property, 254
-disableassertions parameter, 277
disabled property, 254
-disablesystemassertions parameter, 278
DistantLights, 120–121
distortion, GaussianBlur effect for, 112
distributed apps, 251
distributing images, 90
.docx files, 15
double plus sign operator (++) for incrementing, 169
downloading software, 4–7
drag-and-drop interface, 3
drag events, 257
DropShadow effect, 116–118
-dsa parameter, 278
duration property
PathTransition, 142
progress indicator, 211–212
-ea parameter, 277
Eclipse IDE, 7
effect property, 255
effects
Bloom, 106–108
ColorAdjust, 109–110
combining, 130
description, 106
DropShadow, 116–118
GaussianBlur, 110–113
Glow, 113–115
InvertMask, 119
Lighting, 120–123
script setup for, 103–106
SepiaTone, 123–126
Shadow, 118
elevation parameter, 120
ellipses
drawing, 69
RadialGradients, 81
-enableassertions parameter, 277
enabledTracks property, 266
-enablesystemassertions parameter, 277
-encoding parameter, 272
-endorseddirs parameter, 272
endX value
LinearGradient, 78
endY value
LinearGradient, 78
-esa parameter, 277–278
events
description, 147
key, 157–161
in layouts, 224
Excel files, 15
executable applications, compiling, 269–273
exporting images, 93–95
-extdirs parameter, 271–272
extending classes, 184
extracting layers, 97
fader property, 266
Files tab, 16–17
fill attribute
arcs, 67
rectangles, 62
focusable property, 255
focused property, 255
focusTraversable property, 159
folders for images, 90
Font class, 32–33
fonts
labels, 238–239
text, 32–33
full transparency, 77
fully opaque color, 77
function keyword, 41
functions
adding, 40–46
definitions, 104
.fx files, 15
FXDNode, 96–97
FXZ files
creating, 93
working with, 96–98
-g parameter, 269–270
Gaussian algorithm, 110
GaussianBlur effect, 110–113
Glow effect, 113–115
gradients, 77
custom, 82
LinearGradients, 77–81
RadialGradients, 81–82
graphic buttons, 166–172
half transparency, 77
HBox layout, 221–225
height attribute
arcs, 67
DropShadow effect, 116
images, 88
rectangles, 62
Hello World script, 28
bind for, 46–49
comments, 30
functions, 40–46
Run configuration, 40
Stage and Scene, 30–31
text, 31–38
writing to screen, 28–29
-help parameter
javafx, 276
javafxc, 273
horizontal layout, 221–225
hover property, 255
HTML knowledge requirements, 3
Hue, Saturation, Brightness (HSB) color, 76
hue parameter for ColorAdjust, 109
hyphens (-) for properties, 238
id property, 255
IDE (Integrated Development Environment), 4–7
Image class, 87–91
images, 86
exporting, 93–95
FXZ files, 96–98
Image class, 87–91
ImageView node, 86–87
JavaFX Production Suite, 91–96
resizing, 112
rotating, 127–128
types, 99
ImageView node
importing, 86–87
rotating, 127–128
-implicit parameter, 272
import keyword
nodes, 34–35
packages, 22
independent style classes, 241–244
inference variable type, 47
inheriting mouse events, 151, 157
Insert Template: Text Wizard, 34
installing software, 4–7
Integrated Development Environment (IDE), 4–7
interpolators
animation, 142
inverse binding, 213–214
InvertMask effect, 119
items property, 177
Java Archive (JAR) files, 12–13
Java development knowledge requirements, 3
Java SE JDK (Standard Edition Java Development Kit), 4
javafx.animation.Interpolator package, 137
javafx.animation.Timeline package, 133
javafx.awt package, 153
javafx command-line utility, 274–278
javafx.ext.swing package, 164–165
javafx.ext.swing.SwingButton package, 168, 186
javafx.ext.swing.SwingCheckBox package, 174
javafx.ext.swing.SwingComboBox package, 177
javafx.ext.swing.SwingTextField package, 194
javafx.fxd.FXDNode package, 96
JavaFX Production Suite, 91–96
javafx.scene.control.Label package, 240
javafx.scene.control.Slider package, 214
javafx.scene.effect package, 106
javafx.scene.Group package, 194
javafx.scene.image.Image package, 87
javafx.scene.image.ImageView package, 86
javafx.scene.input.MouseEvent package, 153
javafx.scene.layout package, 222, 225
javafx.scene.media.Media package, 205
javafx.scene.media.MediaPlayer package, 204
javafx.scene.paint.Color package, 57, 67, 72
javafx.scene.paint.LinearGradient package, 77
javafx.scene.paint.RadialGradient package, 81
javafx.scene.Scene package, 136
javafx.scene.shape.Arc package, 66
javafx.scene.shape.ArcType package, 66–67
javafx.scene.shape.Circle package, 68, 81, 186
javafx.scene.shape.Color package, 68
javafx.scene.shape.Path package, 141
javafx.scene.shape.Polyline package, 59
javafx.scene.shape.Rectangle package, 61
JavaFX Script language, 3
JavaFX SDK (Software Development Kit), 4
javafxc command-line utility, 269–273
jfx prefix, 92
-jre-restrict-search parameter, 276
key codes, 258–265
key events, 157–161
KeyEvent class, 161
keyframes
animation, 136–137
description, 133
keyFrames collections, 136
keywords, 20–21
knowledge requirements, 3
labels, 238–239
layers
extracting, 97
JavaFX Production Suite, 92–93
layoutBounds property, 255
layouts, 220–221
HBox, 221–225
miscellaneous, 230
nested, 227–230
VBox, 225–227
level parameter, 113
light parameter, 120
Lighting effect, 120
DistantLights, 120–121
PointLights, 121–122
SpotLights, 123
LinearGradient class, 77–81
lines, 53–59
Main class, 29
MediaPlayer, 202–203
video, 203–204
MediaView node, 202–203
metaDown event, 257
middleButtonDown event, 257
milliseconds for video duration, 211
mixing colors, 74–77
Mobile profile, 159–160
mouse events, 148–157, 256–257
MouseEvent class, 153
MoveTo function, 141
MP3 files, 216–217
multiple effects, 130
multiple shapes, 70
music, 216–217
mute property, 266
MyMediaPlayer class, 204
name-value pairs, 23–24
names
in comments, 19
conventions, 14
layers, 92–93
nodes, 23
variables, 46
nested layouts, 227–230
NetBeans development environment
configuring, 7
description, 4
downloading and installing, 4–7
empty projects, 15–18
New Project Wizard, 10–12
node event, 257
nodes
creating, 192–199
importing for, 34–35
overriding, 184–185
rotating, 241–244
type names, 23
Notes class, 193–199
-nowarn parameter, 270
octagons, 65
offset parameter, 78–80
on replace triggers, 187
onBuffering property, 266
onEndOfMedia property, 266
onError property, 266
onKey events in layouts, 224
onKey properties, 255
onKeyPressed event, 157–158, 161
onKeyReleased event, 157–158, 161
onMouse events in layouts, 224
onMouse properties, 255
onMouseClicked event, 149–151, 153, 155
onMouseDragged event, 150
onMouseEntered event, 150
onMouseExited event, 150
onMouseMoved event, 150
onMousePressed event, 149–151, 154
onMouseReleased event, 149–151, 153
on Mouse Wheel Moved event, 148, 150
onRepeat property, 266
onStalled property, 266
opacity
alpha attribute, 76–77
DropShadow effect, 116
InvertMask effect, 119
opacity property, 256
open attribute, 67
orientation of animation, 143
overriding nodes, 184–185
package statement, 20–21
packages
adding images to, 90
naming conventions, 13–15
overview, 12–13
style sheets in, 235–238
Palette
attributes, 33
NetBeans, 16–18
for Stage, 30
for text, 32
parameters
functions, 41–42
name-value pairs, 23
parent property, 256
parentheses () for parameters, 42
Path node, 140–141
Path statement, 268–269
paths
animation along, 139–145
command-line environment, 268–269
PathTransition class, 142
pause button, 207–211
pause method, 209
paused property, 266
Perspective Transform transformations, 128–129
Photoshop, 91–93
placeholder images, 89
-platform parameter, 273
play/pause button, 207–211
playing
audio, 216–217
video, 203–207
plus signs (+) in increment operator, 169
pointer-style input events, 148–157
PointLights, 121–122
points attribute, 60
pointsAtX parameter, 123
pointsAtY parameter, 123
pointsAtZ parameter, 123
polygons, 64–65
Polyline package, 59
polylines, 59–61
popupTrigger event, 257
position, layouts for, 220–221
HBox, 221–225
miscellaneous, 230
nested, 227–230
VBox, 225–227
predefined colors, 72–74
pressed property, 256
primaryButtonDown event, 257
{__PROFILE__} constant, 35, 37, 44
profiles
desktop, 35–36
Mobile, 159–160
progress indicators, 211–215
Project context menu, 14
Project Properties window, 36–37
projects
creating, 10–12
empty, 12–15
NetBeans, 15–18
working files, 15
Projects tab in NetBeans, 16–17
properties
Node, 254–256
Properties dialog box, 248
proportional parameter, 78
question mark (-?) parameter, 276
RadialGradients, 81–82
radius
arcs, 66
circles, 68
DropShadow effect, 116
GaussianBlur effect, 110–113
RadialGradients, 81
radiusX attribute, 66
radiusY attribute, 66
rate property, 266
rectangles, 61–64
Red, Green, Blue (RGB) color, 75–76
registering NetBeans, 7
renaming layers, 92–93
repeatCount property
animation, 138–139
description, 266
PathTransition, 142
requirements for development, 2–3
skills and knowledge, 3
software, 4
reserved words, 20–21
resizing images, 112
return keyword, 44
return value types, 42–43
RGB (Red, Green, Blue) color, 75–76
rotating
images, 127–128
nodes, 241–244
round attribute, 67
RoundButton
creating, 186–192
play/pause button, 207–211
Run configurations
for compilation, 24
creating, 40
Run Main Project option, 31
Run properties, 248–249
saturation attribute
ColorAdjust, 109
HSB color, 76
saving images, 93–94
sayHelloFromBind function, 47–49
scaleX property, 256
scaleY property, 256
Scene node, 31
scene property, 256
Scenes, adding, 30–31
sceneX event, 257
sceneY event, 257
screen, writing to, 28–29
screenX event, 257
screenY event, 257
script files, 19
comments, 19–21
Hello World. See Hello World script
name-value pairs, 23–24
package statement, 20–21
Stage node, 21–23
secondaryButtonDown event, 257
selected property, 178
self-test answers, 280–290
semicolons (;)
attributes, 55
functions, 42
statements, 21
SepiaTone effect, 123–126
-server parameter, 274
Services tab, 16–17
SetImages function, 103–105
Bloom effect, 106–108
DropShadow effect, 117
Glow effect, 114–115
rotation transformation, 127–128
SepiaTone effect, 125
XY transformations, 125–126
shadows
DropShadow effect, 116–118
Shadow effect, 118
shapes, 52
arcs, 65–68
circles, 68–69
creating, 199
drawing, 52–53
ellipses, 69
lines, 53–59
multiple, 70
Palette, 32
polygons, 64–65
polylines, 59–61
rectangles, 61–64
shiftDown event, 257
Show On Startup option, 7
-showversion parameter, 276
size
fonts, 32
images, 112
skills requirements, 3
slashes (/) for comments, 20
snippets
categories, 18
need for, 25
Stage node, 21–23
software
downloading and installing, 4–7
requirements, 4
Software Development Kit (JavaFX SDK), 4
sound files
overview, 201–202
playing, 216–217
Source Packages folder, 12, 14
-sourcepath parameter, 271
-splash parameter, 278
SpotLights, 123
spread parameter, 116
square brackets ([])
arrays, 60
Text node, 32
squares, 61
Stage node
adding, 30–31
name-value pairs, 23–24
snippets, 21–23
Standard Edition Java Development Kit (Java SE JDK), 4
start page in NetBeans, 6
startAngle property, 66
startTime property, 266
startX value
LinearGradient, 78
lines, 54
startY value
LinearGradient, 78
lines, 54
status property, 266
stops parameter
LinearGradient, 78–79
RadialGradient, 81
stopTime property, 266
streaming media, 202
strings
with functions, 43–44
interpolation, 168, 174, 177–178
stroke attribute
arcs, 67
lines, 57
rectangles, 62–63
strokeWidth attribute
arcs, 67
rectangles, 62–63
styleClass property, 242–244, 256
styles, CSS, 234–235
independent style classes, 241–244
packages, 235–238
style creation, 238–239
working with, 239–241
styleSheets property, 240
supportsMultiViews property, 266
swing
applications with, 180
components, 165–166
overview, 164–165
SwingButton, 166–172
SwingCheckBox, 173–176
SwingComboBox and SwingComboBoxItem, 176–180
SwingButton
creating, 166–172
RoundButton node, 186–192
SwingCheckBox component, 173–176
SwingComboBox and SwingComboBoxItem components, 176–180
syntax, 23
-target parameter, 272–273
text and Text node
adding, 31–38
bind with, 46–49
document files, 15
sayHello, 44
writing to screen, 28–29
text property
SwingButton, 168
SwingCheckBox, 174
TextBox
horizontal layout, 221–225
nested layouts, 227–230
vertical layout, 225–227
textFill property, 238
thickness of lines, 57
three-color LinearGradient, 79–81
timelines, 133–139
timers property, 266
timing for smooth animation, 133
titles in Stage, 30–31
toMillis method, 211
transformations
description, 125
Perspective Transform, 128–129
rotation, 127–128
XY, 125–127
transforms property, 256
translateX property
description, 256
Image View node, 127
translateY property
description, 256
frames, 137
Image View node, 127
transparency, 76–77
tween notation, 137
tweening, 137
two-color LinearGradient, 78–79
.txt files, 15
type names in nodes, 23
<type> notation, 104
types of variables, 46–47
U-shaped drawing, 59–61
underscores (_), 35
valueOf method, 212
values in name-value pairs, 23
var keyword, 46
variables, 46–48
VBox layout, 225–227
-verbose parameter
javafx, 275
javafxc, 270
-version parameter
javafx, 275–276
javafxc, 273
versions in comments, 19
vertical layout, 225–227
video
overview, 201–202
play/pause button, 207–211
playing, 203–207
progress indicators, 211–215
supported files, 204
visible property, 256
VK_ key codes, 258–265
void functions, 42
web color hex values, 76
Web image files, 88
Web Run configuration, 37
wheelRotation event, 257
whitespace in arrays, 60
width
arcs, 67
DropShadow effect, 116
images, 88
lines, 57
rectangles, 62
words, writing to screen, 28–29
working files, 15
writing to screen, 28–29
x attribute, 62
x event, 257
-X parameter
javafx, 277
javafxc, 273
x position in Cartesian coordinates, 33
.xlsx files, 15
XY transformations, 125–127
y attribute, 62
y event, 257
y position in Cartesian coordinates, 33
18.117.142.144