.setText(Messages
.getString("SimpleWizardSelectionPage.Operation")); //$NON-NLS-1$
GridData gd = new GridData();
label.setLayoutData(gd);
final ListViewer listViewer = new ListViewer(container);
listViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
listViewer.setContentProvider(new IStructuredContentProvider() {
public Object[] getElements(Object inputElement) {
return ((List) inputElement).toArray();
}
public void dispose() {
// nothing to dispose
}
public void inputChanged(Viewer viewer, Object oldInput,
Object newInput) {
// no input changing
}
});
listViewer.setLabelProvider(new LabelProvider() {
public String getText(Object element) {
return SimpleWizardSelectionPage.this.getText(element);
}
});
listViewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
selectionChanged(new SelectionChangedEvent(listViewer,
listViewer.getSelection()));
advanceToNextPage();
}
});
listViewer.setSorter(new ViewerSorter());
listViewer.setInput(getElements());
listViewer.addSelectionChangedListener(this);
Dialog.applyDialogFont(container);
setControl(container);
}