Project

General

Profile

Revision 31f617c3

ID31f617c3379130be20ec5b939889731ea9d6d9cb
Parent 42e0214d
Child 76ecef0e

Added by Katja Luther almost 2 years ago

ref #7118: add key listener for arrow key in search field of selection dialogs

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/SearchDialog.java
47 47
import org.eclipse.swt.SWT;
48 48
import org.eclipse.swt.accessibility.AccessibleAdapter;
49 49
import org.eclipse.swt.accessibility.AccessibleEvent;
50
import org.eclipse.swt.events.KeyAdapter;
51
import org.eclipse.swt.events.KeyEvent;
50 52
import org.eclipse.swt.events.ModifyEvent;
51 53
import org.eclipse.swt.events.ModifyListener;
52 54
import org.eclipse.swt.events.TraverseEvent;
......
195 197
                    okPressed();
196 198
                }
197 199
            });
200
            searchField.addKeyListener(new KeyAdapter() {
201
                @Override
202
                public void keyPressed(KeyEvent e) {
203
                    if (e.keyCode == SWT.ARROW_DOWN) {
204
                        if (getList().getTable().getItemCount() > 0) {
205
                            getList().getTable().setFocus();
206
                        }
207
                    }
208
                }
209
            });
210

  
198 211
//            createExtendedContentArea(container);
199 212
            new Label(container, SWT.NONE);
213
            search();
200 214

  
201 215
            return container;
202 216
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)