beautypg.com

Screen border color, Touch screen, Screen buffering – Sun Microsystems Computer Accessories User Manual

Page 42

background image

28

Wireless Toolkit Basic Customization Guide • December 2003

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.