wizard.setTitle(MessageText.getString("installPluginsWizard.installMode.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 = 1;
panel.setLayout(layout);
// default is shared installation
((InstallPluginWizard) wizard).shared = true;
Button bSharedMode = new Button(panel,SWT.RADIO);
Messages.setLanguageText(bSharedMode,"installPluginsWizard.installMode.shared");
bSharedMode.setData("mode",new Integer(MODE_SHARED));
bSharedMode.setSelection(true);
GridData data = new GridData(GridData.FILL_VERTICAL);
data.verticalAlignment = GridData.VERTICAL_ALIGN_END;
bSharedMode.setLayoutData(data);
Button bUserMode = new Button(panel,SWT.RADIO);
Messages.setLanguageText(bUserMode,"installPluginsWizard.installMode.user");
bUserMode.setData("mode",new Integer(MODE_USER));
data = new GridData(GridData.FILL_VERTICAL);
data.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
bUserMode.setLayoutData(data);
Listener modeListener = new Listener() {
public void handleEvent(Event e) {
((InstallPluginWizard) wizard).shared = ((Integer) e.widget.getData("mode")).intValue() == MODE_SHARED;
}
};
bUserMode.addListener(SWT.Selection,modeListener);
bSharedMode.addListener(SWT.Selection,modeListener);