Changeset 7631 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
- Timestamp:
- 2014-10-18T20:50:35+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
r7505 r7631 14 14 import javax.swing.text.Document; 15 15 16 import org.openstreetmap.josm.Main; 17 16 18 /** 17 * Subclass of {@link JTextField} that adds a "native" context menu (cut/copy/paste/select all) 18 * and an optional "hint" displayed when no text has been entered. 19 * Subclass of {@link JTextField} that:<ul> 20 * <li>adds a "native" context menu (cut/copy/paste/select all)</li> 21 * <li>adds an optional "hint" displayed when no text has been entered</li> 22 * <li>disables the global advanced key press detector when focused</li> 23 * <br>This class must be used everywhere in core and plugins instead of {@code JTextField}. 19 24 * @since 5886 20 25 */ … … 136 141 @Override 137 142 public void focusGained(FocusEvent e) { 143 Main.map.keyDetector.setEnabled(false); 138 144 repaint(); 139 145 } … … 141 147 @Override 142 148 public void focusLost(FocusEvent e) { 149 Main.map.keyDetector.setEnabled(true); 143 150 repaint(); 144 151 }
Note:
See TracChangeset
for help on using the changeset viewer.
