首页 新闻 论坛 群组 Blog 文档 下载 读书 Tag 网摘 搜索 .NET Java 游戏 视频 人才 外包 第二书店 程序员
您的位置:Mobile->让WTK 模拟器支持触摸事件

让WTK 模拟器支持触摸事件2008-03-25 来自:lizhe1985  [收藏到我的网摘]

来源:http://www.blogjava.net/gooogle/archive/2008/03/19/187378.html

以前在设计j2me 程序的时候老是抱怨WTK22不支持触摸屏,不支持连续按键等等。现在发现自己原来很傻


## files that are necessary for the emulator to start: ##
## they are located at the same directory as this properties file

default_image=neutral.png
pressed_buttons_image=pressed.png
highlighted_image=hilight.png


## screen properties ##

# Screen location, relative to the top-left corner of the
# telephone's image
###############
screen.x=60
screen.y=76

# Screen size in pixels
###############
screen.width=240
screen.height=320

# The region of the screen available to graphics commands
# This section is optional. It defines the drawable region
# of the screen to be a subregion of the whole screen area.
###############
screenPaintableRegion.x=0
screenPaintableRegion.y=10
screenPaintableRegion.width=240
screenPaintableRegion.height=290

# pixel size ratio (shape of each pixel).
# example: 1x1=square pixel, 1x2=rectangular pixel
###############
screenPixelRatio.x = 1
screenPixelRatio.y = 1

# Touchscreen support
###############
touch_screen=true

# Screen Background RGB Color
# examples: 0xffffff = white, 0x000000 = black
###############

# Screen border RGB color is a color of softbuttons and icons
# area. If not defined, screen background color is used
# example: screenBorderColor = 0xf0f0f
###############
screenBorderColor=0xb6b6aa

# Transparency support
# SRC_OVER alpha composition rule
# supported by deafult
###############
enableAlphaChannel=true

netindicator.image: net_indicator.png
netindicator.bounds: 53, 27, 30, 30

button.0 = 140, 631, 84, 37
button.1 = 56, 494, 100, 495, 130, 525, 110, 536, 60, 526
button.2 = 140, 514, 84, 37
button.3 = 230, 525, 270, 494, 304, 494, 302, 525, 245, 537
button.4 = 56, 531, 100, 532, 130, 562, 110, 573, 60, 563
button.5 = 140, 553, 84, 37
button.6 = 227, 562, 267, 531, 303, 531, 299, 562, 242, 574
button.7 = 60, 568, 104, 569, 134, 599, 114, 610, 64, 600
button.8 = 140, 592, 84, 37
button.9 = 223, 599, 263, 568, 299, 568, 295, 599, 238, 611

button.POUND = 220, 636, 260, 605, 296, 605, 292, 636, 235, 648
button.ASTERISK = 66, 605, 110, 606, 140, 636, 120, 647, 70, 637

button.SEND = 53, 435, 117, 465, 117, 493, 56, 481
button.END = 248, 467, 308, 440, 308, 483, 243, 492
button.LEFT = 125, 425, 24, 33
button.RIGHT = 214, 425, 24, 33
button.UP = 163, 417, 38, 18
button.SELECT = 157, 436, 50, 15
button.DOWN = 163, 452, 38, 18
button.CLEAR = 138, 472, 85, 40
button.SOFT1 = 78, 417, 120, 423, 126, 465, 74, 440
button.SOFT2 = 240, 421, 287, 418, 284, 442, 235, 462
button.POWER = 266, 21, 30, 30

command.keys.BACK = SOFT1
command.keys.EXIT = SOFT1
command.keys.CANCEL = SOFT1
command.keys.STOP = SOFT1

command.keys.OK = SOFT2
command.keys.SCREEN = SOFT2
command.keys.ITEM = SOFT2
command.keys.HELP = SOFT2

command.exclusive.SOFT1 = BACK, EXIT, CANCEL, STOP

command.menu.activate = SOFT2

keyboard.handler = com.sun.kvem.midp.DefaultKeyboardHandler

key.0 = VK_0 VK_NUMPAD0
key.1 = VK_1 VK_NUMPAD1
key.2 = VK_2 VK_NUMPAD2
key.3 = VK_3 VK_NUMPAD3
key.4 = VK_4 VK_NUMPAD4
key.5 = VK_5 VK_NUMPAD5
key.6 = VK_6 VK_NUMPAD6
key.7 = VK_7 VK_NUMPAD7
key.8 = VK_8 VK_NUMPAD8
key.9 = VK_9 VK_NUMPAD9
key.POUND = VK_SUBTRACT
key.ASTERISK = VK_MULTIPLY
key.POWER = VK_ESCAPE
key.UP = VK_UP
key.DOWN = VK_DOWN
key.LEFT = VK_LEFT
key.RIGHT = VK_RIGHT
key.SELECT = VK_ENTER
key.SOFT1 = VK_F1
key.SOFT2 = VK_F2
key.SEND = VK_HOME
key.END = VK_END
key.CLEAR = VK_BACK_SPACE

midlet.SUSPEND_ALL = VK_F6
midlet.RESUME_ALL = VK_F7

# Multiple font support:
# font..