Changeset 5449 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2012-08-17T07:45:35+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r5200 r5449 21 21 import javax.swing.JCheckBox; 22 22 import javax.swing.JTable; 23 import javax.swing.KeyStroke;24 23 import javax.swing.ListSelectionModel; 25 24 import javax.swing.SwingUtilities; … … 73 72 super(tr("Filter"), "filter", tr("Filter objects and hide/disable them."), 74 73 Shortcut.registerShortcut("subwindow:filter", tr("Toggle: {0}", tr("Filter")), 75 KeyEvent.VK_F, Shortcut.ALT_SHIFT), 162);74 KeyEvent.VK_F, Shortcut.ALT_SHIFT), 162); 76 75 build(); 77 76 enableFilterAction = new EnableFilterAction(); … … 96 95 private static final Shortcut ENABLE_FILTER_SHORTCUT 97 96 = Shortcut.registerShortcut("core_multikey:enableFilter", tr("Multikey: {0}", tr("Enable filter")), 98 KeyEvent.VK_E, Shortcut.ALT_CTRL);97 KeyEvent.VK_E, Shortcut.ALT_CTRL); 99 98 100 99 private static final Shortcut HIDING_FILTER_SHORTCUT 101 100 = Shortcut.registerShortcut("core_multikey:hidingFilter", tr("Multikey: {0}", tr("Hide filter")), 102 KeyEvent.VK_H, Shortcut.ALT_CTRL);101 KeyEvent.VK_H, Shortcut.ALT_CTRL); 103 102 104 103 … … 214 213 } 215 214 }); 216 215 217 216 // Toggle filter "enabled" on Enter 218 217 InputMapUtils.addEnterAction(userTable, new AbstractAction() { … … 246 245 super.destroy(); 247 246 } 248 247 249 248 static class StringRenderer extends DefaultTableCellRenderer { 250 249 @Override … … 389 388 EnableFilterAction() { 390 389 putValue(SHORT_DESCRIPTION, tr("Enable filter")); 390 ENABLE_FILTER_SHORTCUT.setAccelerator(this); 391 391 } 392 392 … … 412 412 public HidingFilterAction() { 413 413 putValue(SHORT_DESCRIPTION, tr("Hiding filter")); 414 HIDING_FILTER_SHORTCUT.setAccelerator(this); 414 415 } 415 416 -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r5314 r5449 274 274 ); 275 275 getActionMap().put("delete", deleteLayerAction); 276 276 277 277 // Activate layer on Enter key press 278 278 InputMapUtils.addEnterAction(layerList, new AbstractAction() { … … 282 282 } 283 283 }); 284 284 285 285 // Show/Activate layer on Enter key press 286 286 InputMapUtils.addSpacebarAction(layerList, showHideLayerAction); 287 287 288 288 createLayout(layerList, true, Arrays.asList(new SideButton[] { 289 289 new SideButton(moveUpAction, false), … … 469 469 multikeyShortcut = Shortcut.registerShortcut("core_multikey:showHideLayer", tr("Multikey: {0}", 470 470 tr("Show/hide layer")), KeyEvent.VK_S, Shortcut.SHIFT); 471 multikeyShortcut.setAccelerator(this); 471 472 if (init) { 472 473 updateEnabledState(); … … 671 672 multikeyShortcut = Shortcut.registerShortcut("core_multikey:activateLayer", tr("Multikey: {0}", 672 673 tr("Activate layer")), KeyEvent.VK_A, Shortcut.SHIFT); 674 multikeyShortcut.setAccelerator(this); 673 675 putValue("help", HelpUtil.ht("/Dialog/LayerList#ActivateLayer")); 674 676 } -
trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java
r5018 r5449 25 25 private static JumpToNextMarker jumpToNextMarkerAction; 26 26 private static JumpToPreviousMarker jumpToPreviousMarkerAction; 27 27 28 28 public static void initialize() { 29 29 jumpToNextMarkerAction = new JumpToNextMarker(null); … … 32 32 MultikeyActionsHandler.getInstance().addAction(jumpToPreviousMarkerAction); 33 33 } 34 34 35 35 public static void unregisterActions() { 36 36 MultikeyActionsHandler.getInstance().removeAction(jumpToNextMarkerAction); … … 46 46 public JumpToNextMarker(JumpToMarkerLayer layer) { 47 47 multikeyShortcut = Shortcut.registerShortcut("core_multikey:nextMarker", tr("Multikey: {0}", tr("Next marker")), 48 KeyEvent.VK_J, Shortcut.ALT_CTRL); 48 KeyEvent.VK_J, Shortcut.ALT_CTRL); 49 multikeyShortcut.setAccelerator(this); 49 50 putValue(SHORT_DESCRIPTION, tr("Jump to next marker")); 50 51 putValue(NAME, tr("Jump to next marker")); … … 107 108 this.layer = (Layer)layer; 108 109 109 Shortcut.registerShortcut("core_multikey:previousMarker", tr("Multikey: {0}", tr("Previos marker")), 110 KeyEvent.VK_P, Shortcut.ALT_CTRL).setAccelerator(this); 110 multikeyShortcut = Shortcut.registerShortcut("core_multikey:previousMarker", tr("Multikey: {0}", tr("Previos marker")), 111 KeyEvent.VK_P, Shortcut.ALT_CTRL); 112 multikeyShortcut.setAccelerator(this); 111 113 putValue(SHORT_DESCRIPTION, tr("Jump to previous marker")); 112 114 putValue(NAME, tr("Jump to previous marker"));
Note:
See TracChangeset
for help on using the changeset viewer.