TABLE 3 Abstract Command Types in Order of Precedence
Command Type | Description |
|
|
OK | Standard positive answer to a dialog implemented by current |
| screen |
SCREEN | Specifies an |
| current screen, for example, "Load" and "Save" |
ITEM | The command is specific to a particular item on the screen |
HELP | Request for |
|
|
The MIDP implementation in the Wireless Toolkit allocates a command issued by the application to a device button based on the following considerations:
1.The first consideration is the natural correspondence between the command’s type and a input signal such as a button press. For example, if the BACK command type is usually associated with the left soft button, then the implementation first tries to assign it there. If there is no such preferred button for a command type, this consideration is not relevant.
2.The secondary consideration is assignment of the remaining commands that could not be assigned to their preferred buttons. The command precedence and the command priority are used to assign these commands to alternate buttons or to a command menu.
The J2ME Wireless Toolkit allows a variety of abstract command mapping policies to be implemented. An emulated device can use a combination of soft buttons and dedicated command buttons to implement abstract commands, or it can have none of these and just present all abstract commands to the user in an
Note – The mapping policy for abstract commands can vary across actual devices. For example, command type precedence may differ.
Emulating Abstract Command Button Assignments
The Emulator provides the device property file definitions
command.keys.<command_type> and command.menu.<action> to emulate the way a MIDP implementation on the corresponding real device assigns abstract commands to buttons and menus.
You specify the button assignments following the considerations specified at the end of the previous section:
1.Use the definitions command.menu.activate and command.menu.<action> to assign the menu operations to buttons. See “The Abstract Command Menu” on page 37.