Listing The desired search for names that begin with the substring entered by

import javax.microedition.lcdui.Command import import javax.microedition.lcdui.Display import javax.microedition.lcdui.Displayable import javax.microedition.lcdui.Form import javax.microedition.lcdui.TextField import import This class implements the screen that enables the user to search for one or more particular records in the address book. The user enters a name or prefix that represents the name of one or more records in the address book. public class SearchScreen extends Form implements...

Character Encoding Sets

A character encoding set is a mapping between each element of a written language and the binary encoding that uniquely represents it. An individual association that represents a language element and its binary encoding is called a code point. To properly present text to users in a manner appropriate for the user's locale requires applications to work with a character encoding set that can correctly represent the language associated with the application's runtime locale. ASCII is an example of a...

Content Connections

The ContentConnection interface extends the StreamConnection interface. It refines the notion of a stream connection. It characterizes connections that contain content, instead of representing them as a simple stream of raw bytes or a stream whose structure must be known a Of course, all streams contain some kind of content the very purpose of protocol messages is to transport a payload of data. The idea behind the ContentConnection interface is that it represents connections that can describe...

MIDP UI Component Hierarchy

The MIDP inheritance hierarchy diagram in Figure 5.1 reproduces the one you first saw in Figure 3.7 in chapter 3. You've already seen several of the MIDP UI components in this hierarchy, namely Displayable, Screen, Form, and Alert. Figure 5.1. MIDP UI components belong to either the class of Displayable objects or to the class of Item objects, with the exception of the Ticker class, Figure 5.1. MIDP UI components belong to either the class of Displayable objects or to the class of Item objects,...

Compatibility Verification

Compatibility verification is the process of verifying the compatibility of an application for a client in terms of the device, user, and J2ME platform contexts. All provisioning systems should prevent the download or even the discovery of incompatible applications. The provisioning manager can check an application's compatibility with the target device by comparing device and application metainformation. All provisioning systems should prohibit the download of application suites that are...

Record Comparators

You undoubtedly noticed that the second argument passed to enumerate-Records in the previous examples was null. This second parameter is a placeholder for a record comparator. A record comparator is an object that compares two records to determine their ordering, or sorting. Comparators provide applications with the capability to perform some kind of sorting. Like filters, comparators define the semantics of the comparison function. A record comparator is an implementation of the...

How Components Are Painted

You may have noticed that the toggleTranslation method in Listing 6.8 calls Canvas.repaint . This call requests that the implementation repaint the display. The Canvas.repaint call results in an internal implementation event that represents the refresh request. The implementation handles the event internally. It schedules a call to the canvas's paint method, which is executed by the implementation, not by your program. A Canvas needs to be painted to render all the bits drawn in its context, or...

Using the JME Wireless Toolkit

This section shows you how to use the J2ME Wireless Toolkit from Sun's Java Software division to perform all the steps of the development cycle that you did manually. You can download the J2ME Wireless Toolkit free of charge from the Java Software Web site at Sun Microsystems, http java.sun.com. Download the version appropriate for your OS platform, and follow the installation instructions provided with the download. The Wireless Toolkit features and functions are based on projects. A project...

Double Buffering

The term double buffering refers to a technique for buffering a graphics context before displaying it. The idiom requires that you use two graphics contexts or buffers hence its name. You first draw graphics in a secondary graphics context, and later copy its contents to the graphics context that represents the device's display. This secondary graphics context is called an off-screen buffer. An off-screen buffer is one that doesn't render to the display. The motivation for this technique is...

Listing The ListResourceBundle class uses a list in reality a twodimensional

This class defines a resource bundle as a convenient array of resources. It mimics the class of the same name defined by the J2SE platform, java.util.ListResourceBundle. lt p gt This class is abstract. Applications are forced to subclass it and define concrete classes that contain localized resources. lt p gt Concrete application specific subclasses should be named so that the name contains the language and country designation according to the ISO 639 and ISO 3166 standards for languages and...