MIDP3.0

javax.microedition.lcdui
Interface ItemTraversalListener


public interface ItemTraversalListener

This interface is used by applications that need to receive events indicating changes in focus for Items in a Form screen.

An Item has focus when it is selected as the active recipient of regular key events. Thus, an item will not have focus if another Item has focus, if its Form is hidden, or if its Form is shown on a Display that does not have foreground status. None of the Items of a Form will have focus if the Form is not currently being shown on a Display having foreground status.

Traversal events within a given Item are not reported to this listener. For standard Item classes such as StringItem and ChoiceGroup, internal traversal is platform-dependent. For a CustomItem, internal traversal can be controlled by overriding its traverse and traverseOut methods.

Since:
MIDP 3.0
See Also:
Form.setItemTraversalListener(ItemTraversalListener), CustomItem.traverse(int, int, int, int[])

Method Summary
 void itemTraversedIn(Item item)
          Called when the item gains focus.
 void itemTraversedOut(Item item)
          Called when the item loses focus.
 

Method Detail

itemTraversedIn

void itemTraversedIn(Item item)
Called when the item gains focus. The item may gain focus for a variety of reasons including:

Parameters:
item - The item that gained focus
Since:
MIDP 3.0

itemTraversedOut

void itemTraversedOut(Item item)
Called when the item loses focus. The item may lose focus for a variety of reasons including:

Parameters:
item - The item that lost focus
Since:
MIDP 3.0

MIDP3.0

Send a comment or suggestionVersion 3.0 of Mobile Information Device Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-2009 Motorola Inc. Portions copyright 1993-2002 Sun Microsystems, Inc. and Motorola, Inc. All Rights Reserved.