wizard.setTitle(MessageText.getString("ipCheckerWizard.service"));
wizard.setCurrentInfo(MessageText.getString("ipCheckerWizard.chooseService"));
Composite rootPanel = wizard.getPanel();
GridLayout layout = new GridLayout();
layout.numColumns = 2;
rootPanel.setLayout(layout);
Label label = new Label(rootPanel,SWT.WRAP);
GridData gridData = new GridData();
gridData.widthHint = 380;
gridData.horizontalSpan = 2;
label.setLayoutData(gridData);
label.setText(MessageText.getString("ipCheckerWizard.explanations"));
this.servicesList = new Combo(rootPanel,SWT.READ_ONLY);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
servicesList.setLayoutData(gridData);
this.services = ExternalIPCheckerFactory.create().getServices();
for(int i = 0 ; i < services.length ; i++) {
servicesList.add(services[i].getName());
}
label = new Label(rootPanel,SWT.NULL);
label.setText(MessageText.getString("ipCheckerWizard.service.url"));
Cursor handCursor = new Cursor(rootPanel.getDisplay(), SWT.CURSOR_HAND);
this.serviceUrl = new Label(rootPanel,SWT.NULL);
gridData = new GridData(GridData.FILL_HORIZONTAL);
serviceUrl.setLayoutData(gridData);
serviceUrl.setForeground(Colors.blue);
serviceUrl.setCursor(handCursor);
serviceUrl.addMouseListener(new MouseAdapter() {
public void mouseDoubleClick(MouseEvent arg0) {
Utils.launch((String) ((Label) arg0.widget).getText());
}
public void mouseDown(MouseEvent arg0) {
Utils.launch((String) ((Label) arg0.widget).getText());
}
});
servicesList.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
updateInfos();
}
});
servicesList.select(0);
label = new Label(rootPanel,SWT.NULL);
gridData = new GridData();
gridData.heightHint = 50;
gridData.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
label.setLayoutData(gridData);
label.setText(MessageText.getString("ipCheckerWizard.service.description"));
this.serviceDescription = new Label(rootPanel,SWT.WRAP);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.heightHint = 50;
gridData.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
serviceDescription.setLayoutData(gridData);
updateInfos();