<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類的默認風格。
    SWT.FLAT

    • SWT.ARROW

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

    • SWT.TOGGLE

    類似于SWT.PUSH,但是按下后會保持按下狀態。可通過setSelection(boolean)方法來改變其狀態。接下去介紹的check按鈕和radio按鈕也share這個功能

    • SWT.CHECK

    建議用數組來實現,如下:
    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

    建議用數組來實現,如下:
    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);


    通過RadioGroupFieldEditors將radio buttons組合在一起:

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

    其中的各個參數含義如下——1.name for the type of value returned by the editor.2.group label.3.列數。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對象。6.specifies whether the radio buttons should be incorporated in a Group object.

    在SWT/JFace中,container widgets是由Composite類來提供的。

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

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

    常用鏈接

    留言簿(2)

    隨筆分類(23)

    隨筆檔案(22)

    文章檔案(1)

    相冊

    Neighbor

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 久久久久国产亚洲AV麻豆| 精品剧情v国产在免费线观看| 亚洲国产综合精品中文字幕| 国产精品成人亚洲| 日本高清免费网站| 理论片在线观看免费| 亚洲&#228;v永久无码精品天堂久久 | 国产亚洲福利一区二区免费看| 亚洲中文无码卡通动漫野外| 成年私人影院免费视频网站| 亚洲精品无码国产片| 国产一级淫片a免费播放口之| 羞羞视频在线免费观看| 亚洲人成影院在线无码观看| 中文字幕在线免费观看视频| 国产精品亚洲成在人线| 18级成人毛片免费观看| 亚洲人成77777在线观看网| 国产在线观看免费不卡| 一级一黄在线观看视频免费| 精品亚洲一区二区| 亚洲人成免费网站| 亚洲AV成人无码久久WWW| 国产成人精品久久亚洲| 久久精品人成免费| 亚洲人成自拍网站在线观看| 亚洲情a成黄在线观看| 99久久精品免费精品国产| 亚洲卡一卡二卡乱码新区| 亚洲成AV人网址| 久久综合给合久久国产免费| 亚洲小说图区综合在线| 亚洲性猛交XXXX| 无码一区二区三区AV免费| 免费人成网上在线观看| 久久亚洲AV成人无码| 四虎永久免费观看| 最近中文字幕完整版免费高清| 亚洲AV日韩AV永久无码色欲 | 青青视频观看免费99| 美景之屋4在线未删减免费|