int userMode = COConfigurationManager.getIntParameter("User Mode");
wizard.setTitle(MessageText.getString("installPluginsWizard.mode.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.FILL_BOTH | GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
panel.setLayoutData(gridData);
layout = new GridLayout();
layout.numColumns = 1;
panel.setLayout(layout);
Button bListMode = new Button(panel,SWT.RADIO);
Messages.setLanguageText(bListMode,"installPluginsWizard.mode.list");
bListMode.setData("mode",new Integer(MODE_FROM_LIST));
if(((InstallPluginWizard)wizard).mode == MODE_FROM_LIST) bListMode.setSelection(true);
Button bFileMode = new Button(panel,SWT.RADIO);
Messages.setLanguageText(bFileMode,"installPluginsWizard.mode.file");
bFileMode.setData("mode",new Integer(MODE_FROM_FILE));
if(((InstallPluginWizard)wizard).mode == MODE_FROM_FILE) bFileMode.setSelection(true);
Listener modeListener = new Listener() {
public void handleEvent(Event e) {
mode = ((Integer) e.widget.getData("mode")).intValue();
((InstallPluginWizard)wizard).mode = mode;
}
};
bListMode.addListener(SWT.Selection,modeListener);
bFileMode.addListener(SWT.Selection,modeListener);
if(userMode < 2){
Group cWiki = new Group(panel, SWT.WRAP);
cWiki.setText(MessageText.getString("installPluginsWizard.installMode.info.title"));
gridData = new GridData( GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
gridData.verticalIndent = 15;
cWiki.setLayoutData(gridData);
layout = new GridLayout();
layout.numColumns = 4;
layout.marginHeight = 0;
cWiki.setLayout(layout);
gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
gridData.horizontalIndent = 10;
gridData.horizontalSpan = 4;
Label label = new Label(cWiki, SWT.WRAP);
label.setLayoutData( gridData );
label.setText(MessageText.getString("installPluginsWizard.installMode.info.text"));
}