Changeset 5704 in josm for trunk/src/org/openstreetmap/josm/gui/tagging/ac
- Timestamp:
- 2013-02-09T18:08:26+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
r5520 r5704 8 8 import java.awt.event.FocusEvent; 9 9 import java.awt.event.FocusListener; 10 import java.awt.im.InputContext; 10 11 import java.util.Collection; 12 import java.util.Locale; 11 13 12 14 import javax.swing.ComboBoxEditor; … … 33 35 34 36 private int maxTextLength = -1; 37 private boolean useFixedLocale; 35 38 36 39 /** … … 272 275 273 276 /** 277 * If the locale is fixed, English keyboard layout will be used by default for this combobox 278 * all other components can still have different keyboard layout selected 279 */ 280 public void setFixedLocale(boolean f) { 281 useFixedLocale = f; 282 if (useFixedLocale) { 283 privateInputContext.selectInputMethod(new Locale("en", "US")); 284 } 285 } 286 287 private static InputContext privateInputContext = InputContext.getInstance(); 288 289 @Override 290 public InputContext getInputContext() { 291 if (useFixedLocale) { 292 return privateInputContext; 293 } 294 return super.getInputContext(); 295 } 296 297 /** 274 298 * ListCellRenderer for AutoCompletingComboBox 275 299 * renders an AutoCompletionListItem by showing only the string value part
Note:
See TracChangeset
for help on using the changeset viewer.