Changeset 2281 in josm
- Timestamp:
- 2009-10-12T20:59:00+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r2273 r2281 362 362 protected String getUploadComment() { 363 363 switch(southTabbedPane.getSelectedIndex()) { 364 case 0:365 return pnlChangesetSelection.getUploadComment();366 case 1:367 TagModel tm = tagEditorPanel.getModel().get("comment");368 return tm == null? "" : tm.getValue();364 case 0: 365 return pnlChangesetSelection.getUploadComment(); 366 case 1: 367 TagModel tm = tagEditorPanel.getModel().get("comment"); 368 return tm == null? "" : tm.getValue(); 369 369 } 370 370 return ""; … … 802 802 setUploadComment(comment); 803 803 cmt.getEditor().selectAll(); 804 cmt.requestFocus ();804 cmt.requestFocusInWindow(); 805 805 } 806 806 -
trunk/src/org/openstreetmap/josm/gui/widgets/AutoCompleteComboBox.java
r2231 r2281 19 19 public class AutoCompleteComboBox extends JComboBox { 20 20 21 22 private boolean autocompleteEnabled = true; 23 21 24 /** 22 25 * Auto-complete a JComboBox. … … 24 27 * Inspired by http://www.orbital-computer.de/JComboBox/ 25 28 */ 26 privateclass AutoCompleteComboBoxDocument extends PlainDocument {29 class AutoCompleteComboBoxDocument extends PlainDocument { 27 30 private JComboBox comboBox; 28 31 private boolean selecting = false; … … 48 51 // ActionListener informed 49 52 if (selecting) 53 return; 54 if (!autocompleteEnabled) 50 55 return; 51 56 … … 117 122 this.getEditor().setItem(oldValue); 118 123 } 124 125 protected boolean isAutocompleteEnabled() { 126 return autocompleteEnabled; 127 } 128 129 protected void setAutocompleteEnabled(boolean autocompleteEnabled) { 130 this.autocompleteEnabled = autocompleteEnabled; 131 } 119 132 } -
trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
r2218 r2281 19 19 20 20 public void setText(String value) { 21 setAutocompleteEnabled(false); 21 22 ((JTextComponent)getEditor().getEditorComponent()).setText(value); 23 setAutocompleteEnabled(true); 22 24 } 23 25
Note:
See TracChangeset
for help on using the changeset viewer.