Ignore:
Timestamp:
2007-11-10T13:57:37+01:00 (17 years ago)
Author:
ulf
Message:

add keyboard shortcuts

Location:
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/MergeNodeWayAction.java

    r5076 r5434  
    1313
    1414import java.awt.event.ActionEvent;
     15import java.awt.event.KeyEvent;
    1516
    1617import org.openstreetmap.josm.Main;
     
    3334        public MergeNodeWayAction() {
    3435            super(tr("Join node to way"), "mergenodeway",
    35                         tr("Join a node into the nearest way segments"), 0, 0, true);
     36                        tr("Join a node into the nearest way segments"), KeyEvent.VK_J, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true);
    3637        }
    3738
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/SimplifyWayAction.java

    r5226 r5434  
    44
    55import java.awt.event.ActionEvent;
     6import java.awt.event.KeyEvent;
    67import java.util.ArrayList;
    78import java.util.Collection;
     
    2829        public SimplifyWayAction() {
    2930                super(tr("Simplify Way"), "simplify",
    30                         tr("Delete unnecessary nodes from a way."), 0, 0, true);
     31                        tr("Delete unnecessary nodes from a way."), KeyEvent.VK_Y, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK, true);
    3132        }
    3233
  • applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/UtilsPlugin.java

    r5417 r5434  
    1818import org.openstreetmap.josm.gui.MapFrame;
    1919import org.openstreetmap.josm.gui.IconToggleButton;
     20import org.openstreetmap.josm.actions.JosmAction;
    2021
    2122public class UtilsPlugin extends Plugin {
     
    2425
    2526        public UtilsPlugin() {
    26                 MergeNodeWay = Main.main.menu.toolsMenu.add(new MergeNodeWayAction());
     27                JosmAction action;
     28               
     29                action = new MergeNodeWayAction();
     30                MergeNodeWay = Main.main.menu.toolsMenu.add(action);
     31                MergeNodeWay.setAccelerator(action.shortCut);
    2732                MergeNodeWay.setEnabled(false);
    28                 SimplifyWay = Main.main.menu.toolsMenu.add(new SimplifyWayAction());
     33
     34                action = new SimplifyWayAction();
     35                SimplifyWay = Main.main.menu.toolsMenu.add(action);
     36                SimplifyWay.setAccelerator(action.shortCut);
    2937                SimplifyWay.setEnabled(false);
    3038        }
Note: See TracChangeset for help on using the changeset viewer.