饶荣庆 -- 您今天UCWEB了吗?--http://www.ucweb.com

3G 手机开发网

   :: 首页 :: 联系 :: 聚合  :: 管理
  99 Posts :: 1 Stories :: 219 Comments :: 0 Trackbacks

原文 http://www.3geye.net/?3/viewspace-3128

 

  以前在设计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.<face>.<style>.<size>=<font properties file name> |
#                                                     <system font definition>
# Where
# <face> is one of
# system, monospace, proportional
#
# <style> is one of
# plain, bold, italic
#
# <size> is one of
# small, medium, large
#
# Default font is defined by
# font.default=<font properties file name> | <system font definition>
#
# Soft Button font defined by
# font.softButton=<font properties file name> | <system font definition>
#

font.default=SansSerif-plain-10
font.softButton=SansSerif-plain-11


font.system.plain.small: SansSerif-plain-9
font.system.plain.medium: SansSerif-plain-11
font.system.plain.large: SansSerif-plain-14

font.system.bold.small: SansSerif-bold-9
font.system.bold.medium: SansSerif-bold-11
font.system.bold.large: SansSerif-bold-14

font.system.italic.small: SansSerif-italic-9
font.system.italic.medium: SansSerif-italic-11
font.system.italic.large: SansSerif-italic-14

font.system.bold.italic.small: SansSerif-bolditalic-9
font.system.bold.italic.medium: SansSerif-bolditalic-11
font.system.bold.italic.large: SansSerif-bolditalic-14

font.monospace.plain.small: Monospaced-plain-9
font.monospace.plain.medium: Monospaced-plain-11
font.monospace.plain.large: Monospaced-plain-14

font.monospace.bold.small: Monospaced-bold-9
font.monospace.bold.medium: Monospaced-bold-11
font.monospace.bold.large: Monospaced-bold-14

font.monospace.italic.small: Monospaced-italic-9
font.monospace.italic.medium: Monospaced-italic-11
font.monospace.italic.large: Monospaced-italic-14

font.monospace.bold.italic.small: Monospaced-bolditalic-9
font.monospace.bold.italic.medium: Monospaced-bolditalic-11
font.monospace.bold.italic.large: Monospaced-bolditalic-14

font.proportional.plain.small: SansSerif-plain-9
font.proportional.plain.medium: SansSerif-plain-11
font.proportional.plain.large: SansSerif-plain-14

font.proportional.bold.small: SansSerif-bold-9
font.proportional.bold.medium: SansSerif-bold-11
font.proportional.bold.large: SansSerif-bold-14

font.proportional.italic.small: SansSerif-italic-9
font.proportional.italic.medium: SansSerif-italic-11
font.proportional.italic.large: SansSerif-italic-14

font.proportional.bold.italic.small: SansSerif-bolditalic-9
font.proportional.bold.italic.medium: SansSerif-bolditalic-11
font.proportional.bold.italic.large: SansSerif-bolditalic-14

# Font underlining :
#
# Font underlining is enabled by default. It is possible to disable font
# underlining with
#
# font.all.underline.enabled=false
#
# or per font with
#
# font.<face>.<style>.<size>.underline.enabled=false

# Multistate icons support:
#
# icon.<name> = <x location>,<y location>,<initial state>
# icon.<name>.<state #1> = <state #1 image file name>
# ..
# icon.<name>.<state #n> = <state #n image file name>

icon.up: 113, 306, off
icon.up.off:
icon.up.on: ../Share/up.gif

icon.down: 113, 314, off
icon.down.off:
icon.down.on: ../Share/down.gif

icon.left: 105, 308, off
icon.left.off:
icon.left.on: ../Share/left.gif

icon.right: 121, 308, off
icon.right.off:
icon.right.on: ../Share/right.gif

icon.internet: 64, 1, off
icon.internet.off:
icon.internet.on: ../Share/internet.gif

icon.reception: 2, 1, on
icon.reception.on: ../Share/reception.gif

icon.battery: 225, 2, on
icon.battery.on: ../Share/batt.gif

icon.inmode: 113, 2, off
icon.inmode.off:
icon.inmode.ABC: ../Share/ABC.gif
icon.inmode.abc: ../Share/abc_lower.gif
icon.inmode.123: ../Share/123.gif
icon.inmode.kana: ../Share/kana.gif
icon.inmode.hira: ../Share/hira.gif
icon.inmode.sym: ../Share/sym.gif

icon.domain: 210, 0, off
icon.domain.off:
icon.domain.trusted: ../Share/trusted.png

#
# Sound support:
# alert.<alert_type>.sound: <sound file>
# Where possible <alert_type> are
#
# alarm
# info
# warning
# error
# confirmation
#
# Default sound type is used for all alerts where specific sound is not
# defined:
# alert.default.sound: <sound file>

alert.alarm.sound:   ../Share/mid_alarm.wav
alert.info.sound:    ../Share/mid_info.wav
alert.warning.sound: ../Share/mid_warn.wav
alert.error.sound:   ../Share/mid_err.wav
alert.confirmation.sound: ../Share/mid_confirm.wav
vibrator.sound: ../Share/vibrate.wav

# Softbuttons support:
# softbutton.<number>=<x location>,<y location>,<width>,<height>,<font>
#
# Coordinates are relative to the origin of the screen area.

softbutton.0=1,306,78,16, softButton, left
softbutton.1=160,306,78,16, softButton, right

#
# Gamma value for gamma-correction
# Default valu is 1, which means that no gamma-correctio is actually performed
#
#gamma=2

# Color/Grayscale screen support:
colorCount=0x1000
isColor=true

你想要的东西全部在这里了,你想支持触摸屏是把,好的下面改下这些参数就OK了

touch_screen=false改为true就Ok了
enableAlphaChannel=true 这个是说是否支持Aopha通道,就是透明支持

至于其他的,比如连续按键等,还没找到配置哦。

上面的配置大家可以改了下,玩下。很有趣的



爬虫工作室 -- 专业的手机软件开发工作室
3G视线 -- 专注手机软件开发
posted on 2008-03-19 23:00 3G工作室 阅读(1417) 评论(3)  编辑  收藏

Feedback

# re: 让WTK 模拟器支持触摸事件 2009-02-23 12:22 blue
骗人的东西  回复  更多评论
  

# re: 让WTK 模拟器支持触摸事件[未登录] 2009-07-13 10:15 Eason
您好,我试过后,无法支持触摸啊,是不是我搞错什么了呢,谢谢  回复  更多评论
  

# re: 让WTK 模拟器支持触摸事件 2009-07-29 14:56 lc402431247
没错的。找到emulator\wtklib\devices\QwertyDevice修改QwertyDevice.properties
文件。  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: