Item-Specific Abstract Commands

An item-specific abstract command is an action that an app developer assigns to an item. In other words, it is an abstract command that an app developer associates with a form item instead of with the form screen. (See for information on commands.) A form item can have one or more commands associated with it. For string and image items, an item-specific abstract command helps to change its appearance from plain to a button or a hyperlink. See "Buttons and Hyperlinks" on page 97 for more information on how commands help to change the appearance of some form items.

app Developers

Strongly Recommend: Java graphics bulb1_icon.gif Make the commands associated with form items be of type ITEM. Assign priorities if the item has more than one item-specific command. (See "Types of Abstract Commands" on page 166 for more information.)

Recommend: Java graphics bulb2_icon.gif If you find that you are associating the same command with every item on a screen, associate the command with the screen itself instead of with the individual items. When you associate the command with the screen, it should still be of type ITEM so that the device implementation can order the commands properly.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif Treat commands associated with a form item as type ITEM, no matter what type the app developer has specified. Give item-specific abstract commands higher precedence than ITEM commands associated with the screen.

Strongly Recommend: Java graphics bulb1_icon.gif If an item has multiple commands associated with it, make the commands available in the same way as commands associated with the screen. (See "Implementing Abstract Commands" on page 174 for more information.) Screenshot shows item-specific abstract commands on a system menu with other abstract commands.

Screenshot Item Commands

Java graphics 08fig02.gif


Strongly Recommend: Java graphics bulb1_icon.gif Make item-specific abstract commands available to the user only when the item has focus. Screenshot shows this behavior in the MIDP Reference Implementation. The system menu changes as the focus changes. The items that have focus in the first and third screen shots have item-specific commands; the item in the second screen shot does not.

A form item can have a special item-specific abstract commands, called a default command. A default command is an item-specific abstract command that the MIDP implementation can bind to a device-specific selection gesture. If present, it should represent the action that the user would most strongly associate with the item. For example, consider a form item that is an audio player. Its most likely action would be Play; this action would map well to a device-specific selection gesture such as a Select key.

app Developers

Strongly Recommend: Java graphics bulb1_icon.gif If you have an action that a user would strongly associate with a particular item, make it the item's default command.

Consider: Because the default command's label could be invisible on some devices, make sure a default command leads to an action that the user would strongly associate with that item. For example, if the MIDP implementation binds the default command only to the device's Select key, the user would not see your label.

MIDP Implementors

Strongly Recommend: Java graphics bulb1_icon.gif If an item has a default command, bind that command to a special user gesture that is appropriate to your device. For example, if your device has a Select key, you could bind the default command to that key. Similarly, if your device has touch input, tapping the item might invoke the item's default command.

Note that binding an item's default command to a user gesture, such as a Select key, might not be appropriate for some types of form items. For example, the default selection gesture, when applied to a pop-up choice group, typically makes the choice group's elements appear. Since the user already expects that behavior, the device should not use the Select key for the default command in this case.

Strongly Recommend: Java graphics bulb1_icon.gif If there are circumstances under which you would not use the label of an item's default command (for example, if you bind the command only to the Select key), publish the information for app developers.

Strongly Recommend: Java graphics bulb1_icon.gif Make the default command available in the same way you make abstract commands available to the user. (Give the default command the highest precedence within the commands of type ITEM.) For example, you might add the default item-specific command to a system menu. Do this in addition to binding the command to a special user gesture.

If you always make default item-specific commands available in the same way that other commands are available, users always know how to find the command. It would be confusing to have to use different methods on different form items to choose the default command.



   
Comments