站内搜索: 请输入搜索关键词
当前页面: 图书首页 > MIDP Style Guide for the Java 2 Platform, Micro Edition

MIDP Style Guide for the Java 2 Platform, Micro Edition

[ directory ] Previous Section Next Section

5.4 Implicit Lists

An implicit list has a default action associated with it. An implicit list enables a user to select one element and to perform its associated (implied) action on the selection.

Application Developers

Strongly Recommend: graphics/bulb1_icon.gif The minimum size of an implicit list is two elements.

Strongly Recommend: graphics/bulb1_icon.gif Make the implied action the primary task that you expect the user to accomplish with the screen. For example, a mail application might present a list of messages as an implicit list. The user could read the message, delete it, or file it in a different mailbox. The primary task, reading the message, should be the implied action.

Implicit lists have a default select command, SELECT_COMMAND, provided by the MIDP implementation. An application developer can associate the implied action with SELECT_COMMAND, but the user will be given only a neutral label, or no label, for the action. Figure 5.7 shows a list that uses the default SELECT_COMMAND. To choose an element and execute the implied action, the user must press the Select button. The implied action has no command label associated with a soft button.

Recommend: graphics/bulb2_icon.gif Replacing SELECT_COMMAND with an abstract command allows you to provide a meaningful label to help direct users. The abstract command should be of type ITEM (the Select button will still signal your application that a SELECT_COMMAND has taken place). Figure 5.8 shows an abstract command (labeled Choose) provided by an application for the SELECT_COMMAND.

Figure 5.8. Implicit List with an Abstract Command for SELECT_COMMAND

graphics/05fig08.gif

Figure 5.7. Implicit List with Only the Default SELECT_COMMAND

graphics/05fig07.gif

An implicit-list screen can have abstract commands in addition to its implied action.

Application Developers

Consider: Give implicit-list screens an abstract command that enables users to move to another screen without acting on a choice. Provide this abstract command in addition to an implied action. This applies the design consideration, "Make Everything Interruptible" on page 13.

Figure 5.9 shows an implicit list with an abstract command that enables the user to move to another screen without making a choice.

Figure 5.9. Implicit List with an Abstract Command and an Implied Action

graphics/05fig09.gif

An implicit-list screen could also have abstract commands for other tasks. For example, SmartTicket has an implicit list that shows the available movies in the user's viewing area. The list's implied action could be to choose the selected movie. In addition, the screen could have abstract commands associated with it that allow the user to see a poster for the movie or return to the previous screen. Figure 5.10 shows what this screen could look like.

Figure 5.10. SmartTicket's Implicit List with Additional Abstract Commands

graphics/05fig10.gif

MIDP Implementors

Strongly Recommend: graphics/bulb1_icon.gif Do not allow users to invoke the Select command if there are no elements in the list. If there are no elements, disable the Select command and remove it from any soft button or menu.

    [ directory ] Previous Section Next Section