Project

General

Profile

« Previous | Next » 

Revision 236ef965

Added by Katja Luther over 6 years ago

smaller changes in db preference biocase provider list

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/wizard/ListComponent.java
14 14

  
15 15
import javax.swing.event.DocumentEvent;
16 16

  
17
import org.apache.commons.lang.StringUtils;
17 18
import org.eclipse.swt.SWT;
18 19
import org.eclipse.swt.events.MouseEvent;
19 20
import org.eclipse.swt.events.MouseListener;
......
42 43
    private Text providerURI;
43 44

  
44 45
    public ListComponent(Composite parent, int style) {
45
        list = new List(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
46
        list = new List(parent, SWT.BORDER |  SWT.V_SCROLL);
46 47

  
47 48
        java.util.List<String> providerList = new ArrayList<String>();
48 49
        String allProviderString = PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.BIOCASE_PROVIDER_LIST);
......
50 51
        String[] providerArray = allProviderString.split(";");
51 52

  
52 53
        for (String providerString : providerArray){
53
            list.add(providerString);
54
            if (!StringUtils.isBlank(providerString)){
55
                list.add(providerString);
56
            }
54 57
        }
58
        list.add("");
55 59

  
56
        list.setSelection(0);
60
//        list.setSelection(0);
57 61
        GridData dataList = new GridData();
58 62
        dataList.horizontalAlignment = GridData.FILL;
59 63
        dataList.horizontalSpan = 2;
60 64
        dataList.verticalSpan= 4;
65
//        dataList.grabExcessVerticalSpace = true;
61 66

  
62 67
        list.setLayoutData(dataList);
63 68

  
......
198 203

  
199 204
            //Select the new item
200 205
            list.setSelection(index);
201
            list.redraw();
206
            list.update();
207
            providerURI.setText("");
202 208

  
203 209
        }
204 210
    }

Also available in: Unified diff