There are 2 code examples for org.eclipse.jface.wizard.Wizard.

The API names are highlighted below. You can use suckoo button to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.

Project Name: codecover Package: org.codecover.eclipse.utils.recommendationgenerator

Source Code: FileSelector.java (Click to view .java file)

Method Code:
vote
like

public FileSelector(Composite row,Parameter p,final Wizard wizard){
  this.parameter=p;
  this.row=row;
  row.setLayout(new GridLayout(3,false));
  Label label=new Label(row,SWT.NONE);
  label.setText(p.getName());
  GridData gridData=new GridData(SWT.FILL,SWT.CENTER,true,false,1,1);
  gridData.minimumWidth=150;
  final Label fileLabel=new Label(row,SWT.NONE);
  fileLabel.setLayoutData(gridData);
  if (p.getValue() != null) {
    fileLabel.setText(((File)p.getValue()).getName());
  }
  final Button chooseFileButton=new Button(row,SWT.PUSH);
  chooseFileButton.setText("Datei auswählen...");
  chooseFileButton.setToolTipText(p.getDescription());
  chooseFileButton.setData(null);
  chooseFileButton.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      FileDialog fg=new FileDialog(wizard.getShell());
      fg.setText("Datei auswählen...");
      String file=fg.open();
      if (file != null && file.length() > 2) {
        selectedFile=new File(file);
        fileLabel.setText(selectedFile.getName());
      }
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
}
 

Project Name: codecover Package: org.codecover.eclipse.utils.recommendationgenerator

Source Code: FileSelector.java (Click to view .java file)

Method Code:
vote
like

public void widgetSelected(SelectionEvent e){
  FileDialog fg=new FileDialog(wizard.getShell());
  fg.setText("Datei auswählen...");
  String file=fg.open();
  if (file != null && file.length() > 2) {
    selectedFile=new File(file);
    fileLabel.setText(selectedFile.getName());
  }
}