隨筆 - 6, 文章 - 3, 評論 - 3, 引用 - 0
          數據加載中……

          PPC應用程序開發

          1.用eSWT開發同樣是使用shell
          ???注意一點 shell的大小是根據ppc屏幕的大小來設置的 shell.setSize(240,310);

          2.menu 可以通過這樣的方式創建
          ?menuBar = new Menu(getShell(), SWT.BAR);
          ??getShell().setMenuBar(menuBar);
          //???appListManager = AreaManager.getInstance();
          //???
          //???AreaItem[] appList = appListManager.getAreaItems();
          ??
          ??for(int i=0;i<4;i++) {
          ???mainMenu[i] = new MenuItem(menuBar, SWT.CASCADE);
          ???mainMenu[i].setText(Messages.getString("menu.main" + String.valueOf(i+1) + ".name",ApplicationManager.getInstance().getUserSession().getLocale()));
          ???
          ???if(i == 0) {
          ????Menu submenu = new Menu(getShell(), SWT.DROP_DOWN);
          ????mainMenu[i].setMenu(submenu);
          ????MenuItem submenuItem = new MenuItem(submenu, SWT.NONE);
          ????String hotKey = Messages.getString("menu.notification.history.hotkey",ApplicationManager.getInstance().getUserSession().getLocale());
          ????submenuItem.setText(Messages.getString("menu.notification.history.name",ApplicationManager.getInstance().getUserSession().getLocale()));
          ????submenuItem.setAccelerator(SWT.CTRL+hotKey.toCharArray()[0]);
          ????
          ????MenuItem submenuItem2 = new MenuItem(submenu, SWT.NONE);
          ????hotKey = Messages.getString("menu.logout.hotkey",ApplicationManager.getInstance().getUserSession().getLocale());
          ????submenuItem2.setText(Messages.getString("menu.logout.name",ApplicationManager.getInstance().getUserSession().getLocale()));
          ????submenuItem2.setAccelerator(SWT.CTRL+hotKey.toCharArray()[0]);
          ????
          ????submenuItem2.addSelectionListener(new SelectionListener(){
          ?????public void widgetSelected(SelectionEvent arg0) {
          ??????Display display = getDisplay();
          ??????final Shell shell = new Shell (display, SWT.CLOSE|SWT.MOD3);
          ??????LogoutDialog aboutDialog = new LogoutDialog(shell,SWT.NONE);
          ??????shell.setSize(240,150);
          ??????shell.open();
          ?????}

          ?????public void widgetDefaultSelected(SelectionEvent arg0) {
          ?????}});???
          ????submenuItem.addSelectionListener(new SelectionListener() {

          ?????public void widgetSelected(SelectionEvent arg0) {
          ??????????? try {
          ??????????? ?Control[] smallFrame = body.getChildren();
          ???????for(int i=0;i<smallFrame.length;i++) {
          ????????smallFrame[i].dispose();
          ???????}
          ?????????body.redraw();
          ??????????? }
          ??????????? catch(Exception exp) {
          ??????????? ?ApplicationView.this.setMessage(exp.getMessage());
          ??????????? }
          ?????}

          ?????public void widgetDefaultSelected(SelectionEvent arg0) {}
          ?????
          ????});
          ???
          ???
          ???}

          posted on 2006-05-15 10:16 馬甲丁 閱讀(560) 評論(1)  編輯  收藏 所屬分類: PPC

          評論

          # re: PPC應用程序開發[未登錄]  回復  更多評論   

          俺是新手,想知道要開發手機上的active x插件要怎么做
          2009-06-07 14:25 | 小白

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


          網站導航:
           
          主站蜘蛛池模板: 金华市| 娄底市| 平顺县| 岑巩县| 河间市| 凭祥市| 泰州市| 夏邑县| 天镇县| 颍上县| 中牟县| 雅安市| 和平县| 贵州省| 镇江市| 丹东市| 普兰店市| 铁岭县| 聂拉木县| 邵阳县| 大丰市| 阿合奇县| 乌海市| 南木林县| 平昌县| 乌拉特前旗| 昌平区| 环江| 固始县| 荃湾区| 潼南县| 广丰县| 平武县| 乳源| 玉溪市| 临夏市| 泗水县| 岳阳市| 龙门县| 常宁市| 独山县|