- Timestamp:
- 2016-11-25T21:07:05+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
r10611 r11308 26 26 public abstract class AddImageryPanel extends JPanel { 27 27 28 protected final JosmTextArea rawUrl = new JosmTextArea(3, 40) ;28 protected final JosmTextArea rawUrl = new JosmTextArea(3, 40).transferFocusOnTab(); 29 29 protected final JosmTextField name = new JosmTextField(); 30 30 -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
r11289 r11308 23 23 24 24 private final JosmTextField tmsZoom = new JosmTextField(); 25 private final JosmTextArea tmsUrl = new JosmTextArea(3, 40) ;25 private final JosmTextArea tmsUrl = new JosmTextArea(3, 40).transferFocusOnTab(); 26 26 private final transient KeyAdapter keyAdapter = new KeyAdapter() { 27 27 @Override -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r11289 r11308 38 38 private final JComboBox<String> formats = new JComboBox<>(); 39 39 private final JLabel wmsInstruction; 40 private final JosmTextArea wmsUrl = new JosmTextArea(3, 40) ;40 private final JosmTextArea wmsUrl = new JosmTextArea(3, 40).transferFocusOnTab(); 41 41 private final JButton showBounds = new JButton(tr("Show bounds")); 42 42 -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java
r10694 r11308 2 2 package org.openstreetmap.josm.gui.widgets; 3 3 4 import java.awt.KeyboardFocusManager; 4 5 import java.awt.event.FocusEvent; 5 6 import java.awt.event.FocusListener; … … 90 91 } 91 92 93 /** 94 * Restore default behaviour of focus transfer with TAB, overriden by {@link JTextArea}. 95 * @return {@code this} 96 * @since 11308 97 */ 98 public JosmTextArea transferFocusOnTab() { 99 // http://stackoverflow.com/a/525867/2257172 100 setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null); 101 setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null); 102 return this; 103 } 104 92 105 @Override 93 106 public void focusGained(FocusEvent e) {
Note:
See TracChangeset
for help on using the changeset viewer.