Java Reference
In-Depth Information
KEY_PRESS
KEY_RELEASE
KEY_REPEAT
POINTER_PRESS
POINTER_RELEASE
POINTER_DRAG
TRAVERSE_HORIZONTAL
TRAVERSE_VERTICAL
Except for the traversal items (which are covered in the next section), the combination of
values returned from getInteractionModes() corresponds directly to which callbacks are likely
to be invoked in your custom item. You can use this information to build a CustomItem that will
work under any circumstances. For example, in the unlikely event that a device was unable to
deliver both key and pointer events to a custom item, you could supply a Command on the item
to invoke a separate editing screen.
Item Traversal
Form s support a concept of focus , where one item in the form is currently selected. Traversal
refers to the user being able to shift focus from one item to another. In most cases, the MIDP
implementation handles the details of Form traversal. In the Sun emulator, for example, you
can move the focus through the items in a form by pressing the up and down keys. Focus is
indicated by a solid black border around an item. Figure 7-2 shows a form with several items;
the third item, an ImageItem , has the focus.
Figure 7-2. The focus is on the third item in this form.
 
Search WWH ::




Custom Search