熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Java開源技術 >> 正文

Eclipse Form程序設計指南之入門[2]

2022-06-13   來源: Java開源技術 

<xml version= encoding=UTF?>
<eclipse version=?>
<plugin
id=FormSamples
name=FormSamples Plugin
version=
providername=nelson_tu
class=orgxqtusamplesFormSamplesPlugin

<runtime>
<library name=FormSamplesjar
<export name=*/>
</library>
</runtime>

<requires>
<import plugin=orgeclipseui/>
<import plugin=orgeclipsecoreruntime/>
<import plugin=orgeclipseuiforms/>
</requires>

<extension
point=orgeclipseuiviews
<view
class=orgxqtusamplesviewsFormView
name=Form Sample
id=FormView/>
</extension>
</plugin>

  ()添加內容

public void createPartControl(Composite parent) {
toolkit = new FormToolkit(parentgetDisplay());
form = toolkitcreateScrolledForm(parent);
formsetText(Hello Eclipse Forms);

Composite body = formgetBody();
GridLayout layout = new GridLayout();
bodysetLayout(layout);
Hyperlink link = toolkitcreateHyperlink(body Click hereSWTWRAP);
linkaddHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
Systemoutprintln(Link activated!);
}
});
}

[]  []  []  


From:http://tw.wingwit.com/Article/program/Java/ky/201311/29033.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.