Changeset 30668 in osm for applications/editors/josm
- Timestamp:
- 2014-09-23T02:34:08+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
r30436 r30668 1 1 /* 2 2 * CommandLine.java 3 * 3 * 4 4 * Copyright 2011 Hind <foxhind@gmail.com> 5 * 5 * 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License as published by 8 8 * the Free Software Foundation; either version 2 of the License, or 9 9 * (at your option) any later version. 10 * 10 * 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 * 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software … … 19 19 * MA 02110-1301, USA. 20 20 */ 21 22 21 package CommandLine; 23 22 … … 61 60 import org.openstreetmap.josm.gui.layer.ImageryLayer; 62 61 import org.openstreetmap.josm.gui.layer.Layer; 62 import org.openstreetmap.josm.gui.widgets.DisableShortcutsOnFocusGainedTextField; 63 63 import org.openstreetmap.josm.io.GpxWriter; 64 64 import org.openstreetmap.josm.io.OsmWriter; … … 89 89 commandSymbol = ": "; 90 90 history = new History(100); 91 historyField = new JTextField();92 textField = new JTextField() {91 historyField = new DisableShortcutsOnFocusGainedTextField(); 92 textField = new DisableShortcutsOnFocusGainedTextField() { 93 93 @Override 94 94 protected void processKeyEvent(KeyEvent e) { 95 95 if (e.getID() == KeyEvent.KEY_PRESSED) { 96 //String text = textField.getText();97 96 int code = e.getKeyCode(); 98 97 if (code == KeyEvent.VK_ENTER) {
Note:
See TracChangeset
for help on using the changeset viewer.