An earlier J2ME Tech Tip, Using Custom Items in MIDP 2.0,
at http://developers.sun.com/mobility/midp/ttips/customitem/,
described the basic development of custom user interface (UI) components in MIDP 2.0.
That tip showed that a custom UI component extends the The MIDP specification supports a variety of user-interaction methods. A keyboard or keypad is required, but a device may support other input methods, such as a stylus. To be truly portable, an application cannot make assumptions about what methods are available. This uncertainty isn't a problem for the predefined UI components because the device's MIDP implementation maps them to the best input methods available to it, but it does pose a challenge for developers writing custom components. Here is where the concept of interaction modes comes into play. Interaction modes identify the ways that the implementation enables users to interact with an item. Currently three types of interaction modes are defined: keyboard, pointer, and traversal. The keyboard modes indicate whether an item can receive events when a key is pressed, released, or repeated. The pointer modes indicate whether an item can receive events when a pointer is pressed, released, or dragged. The traversal modes indicate whether an item receives internal traversal events, such as a change of input focus or selection, that are triggered by the device's standard traversal mechanisms. Some modes are interdependent. For example, the key-repeat mode is supported only if both the key-press and key-release modes are supported.
At runtime, a component can discover which interaction modes are available by calling
the protected method
If the
No matter what interaction modes are available, custom items can always be associated with
You'll need to implement the | |||||||
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||