import javax.swing.event.DocumentEvent;
+import org.apache.commons.lang.StringUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
private Text providerURI;
public ListComponent(Composite parent, int style) {
- list = new List(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+ list = new List(parent, SWT.BORDER | SWT.V_SCROLL);
java.util.List<String> providerList = new ArrayList<String>();
String allProviderString = PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.BIOCASE_PROVIDER_LIST);
String[] providerArray = allProviderString.split(";");
for (String providerString : providerArray){
- list.add(providerString);
+ if (!StringUtils.isBlank(providerString)){
+ list.add(providerString);
+ }
}
+ list.add("");
- list.setSelection(0);
+// list.setSelection(0);
GridData dataList = new GridData();
dataList.horizontalAlignment = GridData.FILL;
dataList.horizontalSpan = 2;
dataList.verticalSpan= 4;
+// dataList.grabExcessVerticalSpace = true;
list.setLayoutData(dataList);
//Select the new item
list.setSelection(index);
- list.redraw();
+ list.update();
+ providerURI.setText("");
}
}