selectedFetchersList = new List(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
selectedFetchersList.setLayoutData(LayoutHelper.formData(140, 200, new FormAttachment(0), new FormAttachment(selectedLabel, 80, SWT.RIGHT), new FormAttachment(selectedLabel), null));
Iterator<Fetcher> i = fetcherRegistry.getSelectedFetchers().iterator();
i.next(); // skip IP
while (i.hasNext()) {
Fetcher fetcher = i.next();
selectedFetchersList.add(fetcher.getName());
}
Button upButton = new Button(shell, SWT.NONE);
upButton.setText(Labels.getLabel("button.up"));
Button downButton = new Button(shell, SWT.NONE);
downButton.setText(Labels.getLabel("button.down"));
Button addButton = new Button(shell, SWT.NONE);
addButton.setText(Labels.getLabel("button.left"));
Button removeButton = new Button(shell, SWT.NONE);
removeButton.setText(Labels.getLabel("button.right"));
Button prefsButton = new Button(shell, SWT.NONE);
prefsButton.setText(Labels.getLabel("button.fetcherPrefs"));
prefsButton.setToolTipText(Labels.getLabel("text.fetchers.preferences"));
upButton.setLayoutData(LayoutHelper.formData(new FormAttachment(selectedFetchersList), new FormAttachment(downButton, 0, SWT.RIGHT), new FormAttachment(selectedLabel), null));
downButton.setLayoutData(LayoutHelper.formData(new FormAttachment(selectedFetchersList), null, new FormAttachment(upButton), null));
addButton.setLayoutData(LayoutHelper.formData(new FormAttachment(selectedFetchersList), new FormAttachment(downButton, 0, SWT.RIGHT), new FormAttachment(downButton, 16), null));
removeButton.setLayoutData(LayoutHelper.formData(new FormAttachment(selectedFetchersList), new FormAttachment(downButton, 0, SWT.RIGHT), new FormAttachment(addButton), null));
prefsButton.setLayoutData(LayoutHelper.formData(new FormAttachment(selectedFetchersList), new FormAttachment(downButton, 0, SWT.RIGHT), new FormAttachment(removeButton, 16), null));
Label registeredLabel = new Label(shell, SWT.NONE);
registeredLabel.setText(Labels.getLabel("text.fetchers.availableList"));
registeredLabel.setLayoutData(LayoutHelper.formData(new FormAttachment(downButton, 10), null, new FormAttachment(messageLabel, 5), null));
registeredFetchersList = new List(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
registeredFetchersList.setLayoutData(LayoutHelper.formData(140, 200, new FormAttachment(downButton, 10), null, new FormAttachment(registeredLabel), null));
i = fetcherRegistry.getRegisteredFetchers().iterator();
i.next(); // skip IP
while (i.hasNext()) {
Fetcher fetcher = i.next();
String fetcherName = fetcher.getName();
registeredFetcherIdsByNames.put(fetcherName, fetcher.getId());
if (selectedFetchersList.indexOf(fetcherName) < 0)
registeredFetchersList.add(fetcherName);
}
Button okButton = new Button(shell, SWT.NONE);