Sun Microsystems Computer Accessories manual Screen Border Color, Touch Screen, Screen Buffering

Page 42

Screen Border Color

You have the option of setting the color of the icon area, the softbutton area (non- paintable areas), and the device menu. Screen background color is used if this value is not defined. The color is defined as a hexadecimal integer according to the standard Java color map. That is, the integer has the form RRGGBB, where RR, GG, and BB are the red, green and blue components of the color, respectively. For example, white would be 0xffffff and red would be 0xff0000. The screen border color is defined with the property screenBorderColor.

For example:

screenBorderColor = 0xb6b6aa

Touch Screen

You can define whether or not your device should respond to mouse activity on its screen. This is done by defining a property touch_screen to be either true or false.

For example, setting

touch_screen = true

causes the device to respond to mouse activity on its screen.

The default value is:

touch_screen = false

Note – You only see the effect of the touch_screen property in MIDlets that are specifically written for touch screens, such as the PushPuzzle demonstration game included with the J2ME Wireless Toolkit. The user interface widgets in the Default Emulator do not respond to touch screen events (for example, you cannot select an item from a list by clicking on it with the mouse.)

Screen Buffering

By default, output from a MIDlet to the screen is buffered, so the screen is not updated every time the application draws a line or writes some text. Instead, when the application is ready, it signals MIDP that its drawing operations are complete, and only then is the screen updated.

To see screen updates happen immediately, use the following entry:

screenDoubleBuffer = false

Use this entry if you want your applications to perform fewer drawing operations, or if you are emulating a device that does not buffer screen output.

28 Wireless Toolkit Basic Customization Guide • December 2003

Image 42
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 Who Should Use This Book How This Book Is OrganizedUsing Operating System Commands Typographic Conventions Shell PromptsRelated Documentation Accessing Sun Documentation Online Sun Welcomes Your CommentsCustomizing the Wireless Toolkit How to Customize the Wireless ToolkitDevice Property Files and the Default Emulator Customization StepsCustomizing the Wireless Toolkit Wireless Toolkit Basic Customization Guide December Creating Device Property Files Make a Copy of an Existing Main Device Property FileObtain and Enter Image Files Obtain and Enter the Screen Properties Screen LocationTotal Screen Size Display AreaDisplay Area in Full Screen Mode Specifying Screen PropertiesObtain and Enter the Button Properties By measuring the image file, obtain the button propertiesHeight Width Obtain and Enter Soft Button Label Areas Soft button label display is defined by a line of the form Obtain and Enter Icon Properties Defining the Icon Location and StatesEnter 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 Font Underlining Device ImageImage with Buttons Highlighted and Backlight On Image without Buttons PressedImage with Buttons Pressed ScalingScreen Properties Screen Location Display Area in Full Screen Mode Total Screen SizeDisplay Area Screen Pixel Ratio Screen Background ColorScreen 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 Assigning a Game Action to a Button Specifying the Characters Generated by a Button PressAssigning Abstract Commands to Buttons Abstract Command Types in Order of PrecedenceEmulating Abstract Command Button Assignments Precedence of Assigning Commands to a Button Secondary Button Assignments Abstract Command Menu Displayed Icons Defining the Icon Location and StatesSoft Button Label Display Soft Button Labels on the Emulated Device DisplayColor Sound AlertsDevice Software Capabilities Alert Type ValuesLocales Character EncodingsEnableAlphaChannel false Transparent ImagesWireless Toolkit Basic Customization Guide December Default Emulator Device Property Files 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 Device Image Files Icon Image FilesIcon Image Files Support for ByteCode Obfuscators Adding a ByteCode ObfuscatorExample 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