wizard.setTitle(MessageText.getString("installPluginsWizard.file.title"));
wizard.setErrorMessage("");
Composite rootPanel = wizard.getPanel();
GridLayout layout = new GridLayout();
layout.numColumns = 1;
rootPanel.setLayout(layout);
Composite panel = new Composite(rootPanel, SWT.NULL);
GridData gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
panel.setLayoutData(gridData);
layout = new GridLayout();
layout.numColumns = 3;
panel.setLayout(layout);
Label label = new Label(panel,SWT.NULL);
Messages.setLanguageText(label,"installPluginsWizard.file.file");
txtFile = new Text(panel,SWT.BORDER);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
txtFile.setLayoutData(data);
txtFile.addListener(SWT.Modify,new Listener() {
public void handleEvent(Event event) {
checkValidFile();
}
}
);
Button btnBrowse = new Button(panel,SWT.PUSH);
Messages.setLanguageText(btnBrowse,"installPluginsWizard.file.browse");
btnBrowse.addListener(SWT.Selection,new Listener() {
public void handleEvent(Event event) {
FileDialog fd = new FileDialog(wizard.getWizardWindow());
fd.setFilterExtensions(new String[] {"*.zip;*.jar"});
fd.setFilterNames(new String[] {"Azureus Plugins"});
String fileName = fd.open();
if(fileName != null) txtFile.setText(fileName);
}
});
checkValidFile();