Sun Microsystems Computer Accessories Obtain and Enter the Screen Properties, Screen Location

Page 21

pressed_buttons_image = ph1_press.png highlighted_image = ph1_highlight.png

4.Change the indicator image locations in the following lines in NewPhone.properties, if they are different from the existing locations. The network indicator location property has the following format:

netindicator.bounds = x, y, width, height

Where x is a horizontal distance in pixels to the network’s indicator left top corner, y is a vertical distance to the network’s indicator left top corner, width is and indicator’s image width and height is an indicator image’s height. For example:

netindicator.image = indicator.png netindicator.bounds = 17, 82, 19, 19

Obtain and Enter the Screen Properties

By measuring the image file, obtain the screen properties:

Screen Location

Total Screen Size

Display Area

Note – In the following sections, the values entered in the device property file are assumed to be values that you have measured on the image file and are intended to be an example.

Screen Location

Referring to the left image in FIGURE 1 on page 9, you specify the location of the top left corner of the screen relative to the top left corner of the device image by two lines of the form:

screen.x = <horizontal distance in pixels> screen.y = <vertical distance in pixels>

Enter the following measured values for the screen location in

NewPhone.properties:

screen.x = 38 screen.y = 82

Chapter 2 Creating Device Property Files 7

Image 21
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 UnderliningImage with Buttons Pressed Image without Buttons PressedImage with Buttons Highlighted and Backlight On ScalingScreen 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