Changeset 19050 in josm for trunk/src/org/openstreetmap/josm/gui/tagging
- Timestamp:
- 2024-04-22T20:59:26+02:00 (3 weeks ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/tagging
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java
r17595 r19050 98 98 } 99 99 100 switch (vColIndex) {100 switch (vColIndex) { 101 101 case 0: renderTagName((TagModel) value); break; 102 102 case 1: renderTagValue((TagModel) value); break; -
trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
r18801 r19050 60 60 * Creates a new tag editor model. Internally allocates two selection models 61 61 * for row selection and column selection. 62 * 62 * <p> 63 63 * To create a {@link javax.swing.JTable} with this model: 64 64 * <pre> … … 157 157 TagModel tag = get(row); 158 158 if (tag != null) { 159 switch (col) {159 switch (col) { 160 160 case 0: 161 161 updateTagName(tag, (String) value); … … 219 219 /** 220 220 * adds a tag given by a name/value pair to the tag editor model. 221 * 221 * <p> 222 222 * If there is no tag with name <code>name</code> yet, a new {@link TagModel} is created 223 223 * and append to this model. 224 * 224 * <p> 225 225 * If there is a tag with name <code>name</code>, <code>value</code> is merged to the list 226 226 * of values for this tag. -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r18283 r19050 9 9 import java.awt.Window; 10 10 import java.awt.event.ActionEvent; 11 import java.awt.event.InputEvent; 11 12 import java.awt.event.KeyEvent; 12 13 import java.beans.PropertyChangeEvent; … … 134 135 * Action to be run when the user invokes a delete action on the table, for 135 136 * instance by pressing DEL. 136 * 137 * <p> 137 138 * Depending on the shape on the current selection the action deletes individual 138 139 * values or entire tags from the model. 139 * 140 * <p> 140 141 * If the current selection consists of cells in the second column only, the keys of 141 142 * the selected tags are set to the empty string. 142 * 143 * <p> 143 144 * If the current selection consists of cell in the third column only, the values of the 144 145 * selected tags are set to the empty string. 145 * 146 * <p> 146 147 * If the current selection consists of cells in the second and the third column, 147 148 * the selected tags are removed from the model. 148 * 149 * <p> 149 150 * This action listens to the table selection. It becomes enabled when the selection 150 151 * is non-empty, otherwise it is disabled. 151 *152 *153 152 */ 154 153 class DeleteAction extends AbstractAction implements ListSelectionListener { … … 190 189 if (!isEnabled()) 191 190 return; 192 switch (getSelectedColumnCount()) {191 switch (getSelectedColumnCount()) { 193 192 case 1: 194 193 if (getSelectedColumn() == 0) { … … 351 350 addAction = new AddAction(); 352 351 getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) 353 .put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, KeyEvent.CTRL_DOWN_MASK), "addTag");352 .put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, InputEvent.CTRL_DOWN_MASK), "addTag"); 354 353 getActionMap().put("addTag", addAction); 355 354 … … 566 565 * This is a custom implementation of the CellEditorRemover used in JTable 567 566 * to handle the client property <code>terminateEditOnFocusLost</code>. 568 * 567 * <p> 569 568 * This implementation also checks whether focus is transferred to one of a list 570 569 * of dedicated components, see {@link TagTable#doNotStopCellEditingWhenFocused}. -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompEvent.java
r18801 r19050 80 80 public String paramString() { 81 81 String typeStr; 82 switch (id) {82 switch (id) { 83 83 case AUTOCOMP_BEFORE: 84 84 typeStr = "AUTOCOMP_BEFORE"; -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetMenu.java
r18871 r19050 38 38 public JMenu menu; // set by TaggingPresets 39 39 40 private static class PresetTextComparator implements Comparator<JMenuItem>, Serializable {40 private static final class PresetTextComparator implements Comparator<JMenuItem>, Serializable { 41 41 private static final long serialVersionUID = 1L; 42 42 @Override -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r18824 r19050 75 75 private final transient PresetClassifications classifications = new PresetClassifications(); 76 76 77 private static class ResultListCellRenderer implements ListCellRenderer<TaggingPreset> {77 private static final class ResultListCellRenderer implements ListCellRenderer<TaggingPreset> { 78 78 private final DefaultListCellRenderer def = new DefaultListCellRenderer(); 79 79 @Override
Note:
See TracChangeset
for help on using the changeset viewer.