Changeset 17596 in josm for trunk/src/org
- Timestamp:
- 2021-03-20T12:24:13+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java
r16698 r17596 9 9 import java.awt.event.FocusAdapter; 10 10 import java.awt.event.FocusEvent; 11 import java.util.Collections; 11 12 12 13 import javax.swing.AbstractAction; 13 14 import javax.swing.BoxLayout; 14 15 import javax.swing.JButton; 16 import javax.swing.JComponent; 15 17 import javax.swing.JPanel; 16 18 import javax.swing.JScrollPane; 17 19 18 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 import org.openstreetmap.josm.gui.dialogs.properties.HelpAction; 22 import org.openstreetmap.josm.gui.dialogs.properties.HelpTagAction; 19 23 import org.openstreetmap.josm.gui.dialogs.properties.PresetListPanel; 20 24 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 161 165 } 162 166 this.tagTable = new TagTable(this.model, maxCharacters); 167 168 setupKeyboardShortcuts(); 163 169 build(); 170 } 171 172 private void setupKeyboardShortcuts() { 173 // F1 button = custom help action 174 final HelpAction helpTagAction = new HelpTagAction(tagTable, 175 viewRow -> this.model.get(tagTable.convertRowIndexToModel(viewRow)).getName(), 176 viewRow -> Collections.singletonMap(this.model.get(tagTable.convertRowIndexToModel(viewRow)).getValue(), 1)); 177 getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(HelpAction.getKeyStroke(), "onHelp"); 178 getActionMap().put("onHelp", helpTagAction); 164 179 } 165 180
Note:
See TracChangeset
for help on using the changeset viewer.