1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
public void createPartControl(Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createScrolledForm(parent);
GridData gdform = new GridData();
gdform.horizontalAlignment = SWT.TOP;
gdform.verticalAlignment = SWT.RIGHT;
form.getBody().setLayoutData(gdform);
Composite Compo1 = toolkit.createComposite(form.getBody(), SWT.BORDER);
GridLayout gl = new GridLayout();
gl.numColumns = 32;
gl.marginBottom = 0;
gl.marginTop = 0;
button1 = toolkit.createButton(Compo1, Messages.getString("Pouet1"), SWT.RADIO);
gd = new GridData();
button1.setSelection(true);
button1.setLayoutData(gd);
button1.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
if (button1.getSelection()){
}
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
});
Button2 = toolkit.createButton(Compo1, Messages.getString("Pouet2"), SWT.RADIO);
gd = new GridData();
button2.setSelection(true);
button2.setLayoutData(gd);
button2.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
if (button2.getSelection()){
}
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
});
classeCompo1 Compo1 = new classeCompo1(form.getBody());
}
public class classeCompo1 extends Composite {
public classeCompo1 (Composite parent) {
//
super(parent, SWT.BORDER);
TabFolder tabfolder = new TabFolder(parent, SWT.NONE);
.
} |
Partager