New for MIDP 2.0
 |
We have marked a number of topics in this chapter as New! with
an icon in the book margin. Here is a summary of the most important new
high-level user interface features of MIDP 2.0 described in this
chapter. |
Each of the Screen classes has been enhanced to
provide more control over presentation and event handling.
The Font class has been extended to allow:
The List class has been extended to allow:
-
the ability to get and set the Font of each element in
the list (see the setFont and getFont methods),
-
the control of the wrapping or truncation of text within
elements (see the setFitPolicy and getFitPolicy methods),
-
the ability to set the default command for selecting elements
(see the setSelectCommand method),
-
the ability to delete all of the elements in the list with a
single method (see the deleteAll method), and
-
the ability to set mutable Images as elements of a
List (see the append, insert, and constructor
methods).
The Alert class has been extended to allow:
-
the Images in an Alert to be mutable (see the
setImage method),
-
a Gauge to be used as a progress indicator in the
Alert (see the setIndicator and getIndicator
methods),
-
one or more Commands to be added and to replace the
default dismiss command (see the addCommand and removeCommand
methods), and
-
setting a command listener to allow the application to handle
Commands and to disable the built-in timer and command handling (see
the setCommandListener method).