Sun Microsystems Computer Accessories manual Abstract Command Menu

Page 51

The Abstract Command Menu

When there are more abstract commands specified by an application than there are buttons to which they can be mapped, the unmapped abstract commands are placed in a command menu. The following operations are defined for the command menu:

Display/hide menu

Select menu item

Scroll/Traverse up menu

Scroll/Traverse down menu

These menu operations are assigned to buttons as described below.

One button is used to alternately display and hide the menu. It is defined by the property command.menu.activate using the format:

command.menu.activate = <button_name>

The buttons used to navigate the menu are defined using the following properties:

command.menu.select = <menu_select_key> command.menu.up = <menu_up_key> command.menu.down = <menu_down_key>

The default values for these properties are:

command.menu.select = SELECT command.menu.up = UP command.menu.down = DOWN

Example

This example sets the menu to be activated by the SOFT2 key and to be navigated with the standard keys.

command.menu.activate = SOFT2

Customizing Menu Title and Soft Button

You can customize the title of the menu as well as the label of the soft button used to display and hide the menu. Use the following properties:

menu.text.title = <menu title> menu.title.activate = <soft button label>

The default values for these properties are:

menu.text.title = Menu menu.title.activate = Menu

Note – Real devices can have alternate human interfaces that employ means other than menus to handle commands that cannot be mapped to keys.

Chapter 3 Examining Device Property Files 37

Image 51
Contents Basic Customization Guide Please Contents Examining Device Property Files Default Emulator Device Property Files Vi Wireless Toolkit Basic Customization Guide December Figures Viii Wireless Toolkit Basic Customization Guide December Tables Wireless Toolkit Basic Customization Guide December How This Book Is Organized Who Should Use This BookUsing Operating System Commands Typographic Conventions Shell PromptsRelated Documentation Sun Welcomes Your Comments Accessing Sun Documentation OnlineHow to Customize the Wireless Toolkit Customizing the Wireless ToolkitCustomization Steps Device Property Files and the Default EmulatorCustomizing the Wireless Toolkit Wireless Toolkit Basic Customization Guide December Make a Copy of an Existing Main Device Property File Creating Device Property FilesObtain and Enter Image Files Screen Location Obtain and Enter the Screen PropertiesDisplay Area Total Screen SizeSpecifying Screen Properties Display Area in Full Screen ModeBy measuring the image file, obtain the button properties Obtain and Enter the Button PropertiesHeight Width Obtain and Enter Soft Button Label Areas Soft button label display is defined by a line of the form Defining the Icon Location and States Obtain and Enter Icon PropertiesEnter the following measured values for the icons properties Enter Color Properties Run the Emulator for the New DeviceScreen Background RGB Color Examining Device Property Files Device Property Files Main Device Property File FontsFonts Used by the Midp APIs Default Font System FontsBitmap Fonts Ascii character Distance to character Device Image Font UnderliningScaling Image without Buttons PressedImage with Buttons Pressed Image with Buttons Highlighted and Backlight OnScreen Properties Screen Location Display Area in Full Screen Mode Total Screen SizeDisplay Area Screen Background Color Screen Pixel RatioScreen Border Color Touch ScreenScreen Buffering Device Buttons Keyboard HandlerDefining a Device Button Button.LEFT = 13, 197, 20 Assigning a PC Keyboard Key to a Button Specifying the Characters Generated by a Button Press Assigning a Game Action to a ButtonAbstract Command Types in Order of Precedence Assigning Abstract Commands to ButtonsEmulating Abstract Command Button Assignments Precedence of Assigning Commands to a Button Secondary Button Assignments Abstract Command Menu Defining the Icon Location and States Displayed IconsSoft Button Labels on the Emulated Device Display Soft Button Label DisplaySound Alerts ColorAlert Type Values Device Software CapabilitiesCharacter Encodings LocalesTransparent Images EnableAlphaChannel falseWireless Toolkit Basic Customization Guide December Property Files Default Emulator Device Property FilesDefaultGrayPhone.properties Appendix a Default Emulator Device Property Files Wireless Toolkit Basic Customization Guide December Appendix a Default Emulator Device Property Files Wireless Toolkit Basic Customization Guide December # alert.alerttype.sound soundfile Wireless Toolkit Basic Customization Guide December Icon Image Files Device Image FilesIcon Image Files Adding a ByteCode Obfuscator Support for ByteCode ObfuscatorsExample Appendix B Support for ByteCode Obfuscators Wireless Toolkit Basic Customization Guide December P E N D I X C Wireless Toolkit Basic Customization Guide December Index Keyboard.handler property Device property files, 1 WMA messages, customizing Wireless Toolkit Basic Customization Guide December