Changeset 11366 in josm for trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
- Timestamp:
- 2016-12-08T00:54:43+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
r11288 r11366 131 131 public void setHistoryComboBoxDownFocusTraversalHandler(final Action handler, final HistoryComboBox hcb) { 132 132 hcb.getEditor().addActionListener(handler); 133 hcb.getEditorComponent().addKeyListener( 134 new KeyAdapter() { 135 @Override 136 public void keyTyped(KeyEvent e) { 137 if (e.getKeyCode() == KeyEvent.VK_TAB) { 138 handler.actionPerformed(new ActionEvent(hcb, 0, "focusDown")); 139 } 140 } 141 } 142 ); 133 hcb.getEditorComponent().addKeyListener(new HistoryComboBoxKeyAdapter(hcb, handler)); 143 134 } 144 135 … … 184 175 } 185 176 177 static final class HistoryComboBoxKeyAdapter extends KeyAdapter { 178 private final HistoryComboBox hcb; 179 private final Action handler; 180 181 HistoryComboBoxKeyAdapter(HistoryComboBox hcb, Action handler) { 182 this.hcb = hcb; 183 this.handler = handler; 184 } 185 186 @Override 187 public void keyTyped(KeyEvent e) { 188 if (e.getKeyCode() == KeyEvent.VK_TAB) { 189 handler.actionPerformed(new ActionEvent(hcb, 0, "focusDown")); 190 } 191 } 192 } 193 186 194 /** 187 195 * Updates the changeset comment model upon changes in the input field.
Note:
See TracChangeset
for help on using the changeset viewer.