up.setText("Up");
up.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
up.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
int i = getSelectedConfigurationIndex();
Configuration c = orderedConfigurations[i];
orderedConfigurations[i] = orderedConfigurations[i - 1];
orderedConfigurations[i - 1] = c;
confTableViewer.refresh();
updateUpDownEnableButtons(true);
}
});
down = new Button(upDownButtons, SWT.PUSH);
down.setText("Down");
down.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));
down.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
int i = getSelectedConfigurationIndex();
Configuration c = orderedConfigurations[i];
orderedConfigurations[i] = orderedConfigurations[i + 1];
orderedConfigurations[i + 1] = c;
confTableViewer.refresh();
updateUpDownEnableButtons(true);
}