Changeset 14416 in osm for applications
- Timestamp:
- 2009-04-07T20:56:18+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TableCellEditor.java
r14338 r14416 42 42 private AutoCompletionList autoCompletionList = null; 43 43 44 44 45 /** 45 46 * constructor … … 128 129 } 129 130 130 logger.info("acCache=" + acCache);131 131 for (String value : acCache.getValues(forKey)) { 132 132 autoCompletionList.add( … … 182 182 @Override 183 183 public Object getCellEditorValue() { 184 String value = ""; 184 return editor.getText(); 185 } 186 187 188 189 @Override 190 public void cancelCellEditing() { 191 super.cancelCellEditing(); 192 } 193 194 @Override 195 public boolean stopCellEditing() { 196 185 197 if (currentColumn == 0) { 186 198 currentTag.setName(editor.getText()); … … 192 204 } 193 205 } 194 return value; 195 } 196 197 198 199 @Override 200 public void cancelCellEditing() { 201 super.cancelCellEditing(); 202 } 203 204 @Override 205 public boolean stopCellEditing() { 206 boolean ret = super.stopCellEditing(); 207 return ret; 208 206 207 return super.stopCellEditing(); 209 208 } 210 209 … … 230 229 this.acCache = acCache; 231 230 } 231 232 232 233 233 -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java
r14338 r14416 89 89 @Override public Object getValueAt(int rowIndex, int columnIndex) { 90 90 if (rowIndex >= getRowCount()) { 91 return null; 92 } 93 if (columnIndex >= getColumnCount()) { 94 return null; 91 throw new IndexOutOfBoundsException("unexpected rowIndex: rowIndex=" + rowIndex); 95 92 } 96 93 … … 104 101 } 105 102 } 103 106 104 107 105 /** … … 534 532 fireTableDataChanged(); 535 533 } 534 535 536 public void updateTagName(TagModel tag, String newName) { 537 String oldName = tag.getName(); 538 tag.setName(newName); 539 if (! newName.equals(oldName)) { 540 setDirty(true); 541 } 542 } 543 544 public void updateTagValue(TagModel tag, String newValue) { 545 String oldValue = tag.getValue(); 546 tag.setValue(newValue); 547 if (! newValue.equals(oldValue)) { 548 setDirty(true); 549 } 550 } 536 551 }
Note:
See TracChangeset
for help on using the changeset viewer.