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 60 61 62 63 64 65 66 67 68
| public void createControl(Composite parent) {
this.parent = parent;
comp = new Composite(parent, SWT.CENTER);
GridLayout grid = new GridLayout(3,false);
comp.setLayout(grid);
Label labelTitre = new Label(comp,SWT.NONE);
labelTitre.setText("Informations concernants les numéros de configuration");
labelTitre.setFont(new Font(null,"Arial",14,0));
GridData titreGD = new GridData(SWT.CENTER, SWT.ARROW, true, false);
titreGD.horizontalSpan = 4;
titreGD.heightHint = 40;
ScrolledComposite scrolledComposite = new ScrolledComposite (comp, SWT.V_SCROLL);
labelTitre.setLayoutData(titreGD);
Group groupTT = new Group(scrolledComposite,SWT.NONE);
scrolledComposite.setContent(groupTT);
scrolledComposite.setSize(groupTT.computeSize(SWT.DEFAULT, SWT.DEFAULT));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
Group groupOM = new Group(comp,SWT.NONE);
Group groupOT = new Group(comp,SWT.NONE);
GridLayout gridTT = new GridLayout(2,false);
groupTT.setLayout(gridTT);
Label labelTTtitre = new Label(groupTT,SWT.NONE);
labelTTtitre.setText("Renommer les Tests Type");
labelTTtitre.setFont(new Font(null,"Arial",10,0));
GridData ttGridData = new GridData(GridData.FILL_HORIZONTAL);
ttGridData.horizontalSpan = 2;
labelTTtitre.setLayoutData(ttGridData);
listMat = MyWizard.one.getListTableChecked();
String name = MyWizard.one.getName();
java.util.List<String> nameMatSansAff = new ArrayList<String>();
for(int i = 0; i<listMat.size(); i++){
String[] nameMat = listMat.get(i).split(name);
nameMatSansAff.add(nameMat[0]);
}
java.util.List<String> nameTestType = new ArrayList<String>();
for(int i = 0; i<nameMatSansAff.size(); i++){
String[] nameTT = nameMatSansAff.get(i).split("_");
boolean exist = false;
for(int t = 0; t<nameTT.length; t++){
for(int j = 0; j<nameTestType.size(); j++){
if(nameTT[t].equals(nameTestType.get(j))){
exist = true;
}
}
if(!exist){
nameTestType.add(nameTT[t]);
}
}
}
for(int i=0; i<nameTestType.size(); i++){
Label labelTT = new Label(groupTT,SWT.NONE);
labelTT.setText(nameTestType.get(i));
labelTT.setFont(new Font(null,"Arial",9,0));
Text textTT = new Text(groupTT,SWT.BORDER);
textTT.setText(nameTestType.get(i)+"_");
GridData textGD = new GridData(GridData.FILL_HORIZONTAL);
textGD.widthHint = 100;
textTT.setLayoutData(textGD);
}
setControl(comp);
setPageComplete(true);
} |
Partager