java

位置:IT落伍者 >> java >> 浏览文章

Eclipse Form程序设计指南之入门[2]


发布日期:2020年11月28日
 
Eclipse Form程序设计指南之入门[2]

<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!);

}

});

}

[] [] []

               

上一篇:Eclipse Form程序设计指南之入门[3]

下一篇:Spring笔记和小结(一)