Game Development Reference
In-Depth Information
Package Name
Functions
Description of Contents
javafx.scene.paint
Painting
Paint classes: Paint, Color, LinearGradient, Radi-
alGradient, Stop, Material, and so on
javafx.scene.shape
Geometry
2D and 3D geometry classes: Mesh, Shape, Shape3D,
Arc, Circle, Line, Path, and so on
javafx.scene.text
Text and
font
Text rendering and font rendering classes: Font, Text,
TextFlow, and so on
javafx.scene.transform Transforms Transform classes: Transform, Scale, Rotate, Shear,
Translate, Affine
javafx.scene.web
WebKit
Web support classes: WebView, WebEvent, We-
bEngine, HTMLEditor
Let's start with the packages that have the fewest classes. The table lists subpack-
ages alphabetically, but the first one, javafx.scene.canvas, coincidentally contains only
one class, the Canvas class, which, as its name suggests, is employed to create a Can-
vas object that is used as a canvas for you to create things with! The next subpackage
listed is javafx.scene.chart; this has charting classes, such as PieChart, LineChart,
XYChart, BarChart, AreaChart, and BubbleChart, for use in business applications,
which is a different book entirely, so I will not be covering charting.
The next subpackage, javafx.scene.control , offers all the UI control (“widget,” in
Android) classes, such as Button, Menu, CheckBox, RadioButton, DatePicker, Col-
orPicker, ProgressBar, Slider, Label, Scrollbar, and TextField and about eight dozen
others. Because there are approximately a hundred classes in javafx.scene.control, I am
not even going to attempt to cover it here; an entire book could probably be written
about this subpackage! If you want to review these classes, simply reference
“javafx.scene.control” on Google or on the Oracle Java website, and you can peruse
what these classes can do for days on end. For this subpackage, “reference” is the key
word, as you will want to reference this package and its classes individually at the time
you need to implement a given UI element.
The next subpackage, javafx.scene.effect , provides all the special effects classes,
almost two dozen of them. These can be very useful for Java 8 game development, so
this is one of the few subpackages that I am going to cover in detail in this section.
The javafx.scene.image subpackage is used to implement digital imagery within
JavaFX, and it has the Image , ImageView , WritableImage , PixelFormat , and Writ-
ablePixelFormat classes. The ImageView class is what you will normally use to hold
your digital image assets, and the more advanced PixelFormat classes let you create
digital imagery on a pixel-by-pixel basis if you want to do more advanced (al-
gorithmic) pixel-based digital image creation.
Search WWH ::




Custom Search