<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    The Goal
    Keep walking……
    posts - 23,  comments - 1,  trackbacks - 0
    • SWT.PUSH

    Button類的默認(rèn)風(fēng)格。
    SWT.FLAT

    • SWT.ARROW

    與SWT.UP, SWT.DOWN, SWT.LEFT, and SWT.RIGHT組合,也可使用SWT.FLAT

    • SWT.TOGGLE

    類似于SWT.PUSH,但是按下后會(huì)保持按下?tīng)顟B(tài)。可通過(guò)setSelection(boolean)方法來(lái)改變其狀態(tài)。接下去介紹的check按鈕和radio按鈕也share這個(gè)功能

    • SWT.CHECK

    建議用數(shù)組來(lái)實(shí)現(xiàn),如下:
    Button[] checks = new Button[2];
    checks[0] = new Button(shell, SWT.CHECK);
    checks[0].setText("Choice 1");
    checks[0].setLocation(10,5);
    checks[0].pack();
    checks[1] = new Button(shell, SWT.CHECK);
    checks[1].setText("Choice 2");
    checks[1].setLocation(10,30);
    checks[1].pack();

    • SWT.RADIO

    建議用數(shù)組來(lái)實(shí)現(xiàn),如下:
    Button[] radios = new Button[3];
    radios[0] = new Button(shell, SWT.RADIO);
    radios[0].setSelected(true);
    radios[0].setText("Choice 1");
    radios[0].setLocation(10,5);
    radios[0].pack();
    radios[1] = new Button(shell, SWT.RADIO);
    radios[1].setText("Choice 2");
    radios[1].setLocation(10,30);
    radios[1].pack();
    radios[2] = new Button(shell, SWT.RADIO);
    radios[2].setText("Choice 3");
    radios[2].setLocation(10,55);
    radios[2].pack();
    for (int i=0; i<radios.length; i++)
    if (radios[i].getSelected())
    System.out.println(i);


    通過(guò)RadioGroupFieldEditors將radio buttons組合在一起:

    RadioGroupFieldEditor rgfe = new RadioGroupFieldEditor(
    "UserChoice", "Choose an option:", 1,
    new String[][] {{"Choice1", "ch1"},
    {"Choice2", "ch2"},
    {"Choice3", "ch3"}},
    shell, true);

    其中的各個(gè)參數(shù)含義如下——1.name for the type of value returned by the editor.2.group label.3.列數(shù)。4.creates a set of option names with their associated values.In this manner, the RadioGroupFieldEditor can display a series of radio buttons without allocating Button objects.5.將editor加至Shell對(duì)象。6.specifies whether the radio buttons should be incorporated in a Group object.

    在SWT/JFace中,container widgets是由Composite類來(lái)提供的。

    posted on 2006-03-21 17:03 JOO 閱讀(281) 評(píng)論(0)  編輯  收藏 所屬分類: SWT & JFace IN ACTION
    Hit the target!

    <2006年3月>
    2627281234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    常用鏈接

    留言簿(2)

    隨筆分類(23)

    隨筆檔案(22)

    文章檔案(1)

    相冊(cè)

    Neighbor

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 亚洲伦理一区二区| 国产亚洲精品观看91在线| 亚洲第一页在线播放| 无码人妻丰满熟妇区免费| 国产AⅤ无码专区亚洲AV| 青青青视频免费观看| 黄页网址大全免费观看12网站| aa在线免费观看| 成人午夜性A级毛片免费| 亚洲精品午夜国产VA久久成人 | 久久精品国产亚洲av成人| 亚洲国产美女视频| 国产精品1024在线永久免费 | 亚洲AV无码成H人在线观看 | 成人A毛片免费观看网站| 国产偷国产偷亚洲高清日韩 | 亚洲午夜免费视频| 国产精品色拉拉免费看| 亚洲熟妇无码八AV在线播放| www成人免费观看网站| 亚洲一区中文字幕在线电影网| 成人免费黄色网址| 亚洲精品无AMM毛片| 美女视频黄频a免费| 国产成人免费片在线观看| 水蜜桃视频在线观看免费| 亚洲中文字幕无码不卡电影| 国产在线国偷精品免费看| 亚洲成色在线影院| 女人被弄到高潮的免费视频| 久久国产亚洲精品无码| eeuss草民免费| 77777_亚洲午夜久久多人| 国产线视频精品免费观看视频| 久久精品7亚洲午夜a| 波多野结衣在线免费观看| 蜜臀亚洲AV无码精品国产午夜.| 亚洲欧洲免费无码| 亚洲国产精品一区| 日韩a级毛片免费观看| 成人免费无码H在线观看不卡|