Button folderButton = new Button(fileSelectionArea, SWT.PUSH);
folderButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
folderButton.setText("...");
folderButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
DirectoryDialog directoryDialog = new DirectoryDialog(fileSelectionArea.getShell(), SWT.OPEN);
directoryDialog.setText("Select geopaparazzi folder");
geopaparazziFolderPath = directoryDialog.open();
if (geopaparazziFolderPath == null || geopaparazziFolderPath.length() < 1) {
geopaparazziFolderText.setText("");
} else {
geopaparazziFolderText.setText(geopaparazziFolderPath);
}
}
});
outputFolderText = new Text(fileSelectionArea, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
outputFolderText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
outputFolderText.setText("Select the output folder");
outputFolderText.setEditable(false);
Button outputFolderButton = new Button(fileSelectionArea, SWT.PUSH);
outputFolderButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
outputFolderButton.setText("...");
outputFolderButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter(){
public void widgetSelected( org.eclipse.swt.events.SelectionEvent e ) {
DirectoryDialog directoryDialog = new DirectoryDialog(fileSelectionArea.getShell(), SWT.SAVE);
directoryDialog.setText("Select output folder");
outputFolderPath = directoryDialog.open();
if (outputFolderPath == null || outputFolderPath.length() < 1) {
outputFolderText.setText("");
} else {
outputFolderText.setText(outputFolderPath);
}