饒榮慶 -- 您今天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工作室 閱讀(1422) 評論(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
          文件。  回復  更多評論
            


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 丁青县| 吉隆县| 若尔盖县| 凌源市| 西丰县| 柳江县| 汉寿县| 丹江口市| 扎赉特旗| 彭泽县| 青冈县| 安宁市| 兴宁市| 翼城县| 阿勒泰市| 安顺市| 闻喜县| 旺苍县| 尚志市| 青海省| 寿阳县| 祁门县| 丰顺县| 大姚县| 山东省| 阿坝县| 格尔木市| 航空| 密山市| 绍兴县| 马鞍山市| 商水县| 沂水县| 沂南县| 长沙市| 龙游县| 太保市| 平利县| 金寨县| 武安市| 中山市|