Project

General

Profile

« Previous | Next » 

Revision f4fa11df

Added by Katja Luther about 7 years ago

adapt taxeditor for specimen imports of algae and obeservations

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/dataimport/DataImportView.java
60 60

  
61 61
    protected Collection<T> results = new ArrayList<T>();
62 62

  
63
    protected boolean updated = false;
64

  
63 65
    protected OccurenceQuery query;
64 66

  
65 67
    private static ConversationHolder conversationHolder;
66 68

  
67 69
    private SaveImportedSpecimenAction saveImportedSpecimenAction;
68
    
70

  
69 71
    private Text textClassification;
70 72
    private Classification classification;
71 73
    /**
......
125 127
        table = checkboxTableViewer.getTable();
126 128
        toolkit.paintBordersFor(table);
127 129

  
128
        
129
        
130

  
131

  
130 132
        createActions();
131 133
        initializeToolBar();
132 134
        initializeMenu();
......
170 172
     */
171 173
    public void setResults(Collection<T> results) {
172 174
        this.results = results;
175
        updated=false;
173 176
    }
174 177

  
175 178
    /* (non-Javadoc)
......
190 193
    }
191 194

  
192 195
    protected void refresh(){
193
       // getTable().removeAll();
194
        for(T item:results){
195
            TableItem tableItem = new TableItem(getTable(), SWT.NONE);
196
            tableItem.setText(getTextForTableItem(item));
197
            tableItem.setData(item);
196

  
197
        if (!updated){
198
            if (getTable() != null){
199
                getTable().removeAll();
200
            }
201
            for(T item:results){
202
                TableItem tableItem = new TableItem(getTable(), SWT.NONE);
203
                tableItem.setText(getTextForTableItem(item));
204
                tableItem.setData(item);
205
            }
206
            updated = true;
198 207
        }
199 208
    }
200 209

  

Also available in: Unified diff