Package org.openstreetmap.josm.actions

Examples of org.openstreetmap.josm.actions.MoveAction


        if (!zoomToEditLayerBoundingBox())
          new AutoScaleAction("data").actionPerformed(null);

        new MapMover(MapView.this, Main.contentPane);
        JosmAction mv;
        mv = new MoveAction(MoveAction.Direction.UP);
        if (mv.getShortcut() != null) {
          Main.contentPane.getInputMap(
              JComponent.WHEN_IN_FOCUSED_WINDOW).put(
              mv.getShortcut().getKeyStroke(), "UP");
          Main.contentPane.getActionMap().put("UP", mv);
        }
        mv = new MoveAction(MoveAction.Direction.DOWN);
        if (mv.getShortcut() != null) {
          Main.contentPane.getInputMap(
              JComponent.WHEN_IN_FOCUSED_WINDOW).put(
              mv.getShortcut().getKeyStroke(), "DOWN");
          Main.contentPane.getActionMap().put("DOWN", mv);
        }
        mv = new MoveAction(MoveAction.Direction.LEFT);
        if (mv.getShortcut() != null) {
          Main.contentPane.getInputMap(
              JComponent.WHEN_IN_FOCUSED_WINDOW).put(
              mv.getShortcut().getKeyStroke(), "LEFT");
          Main.contentPane.getActionMap().put("LEFT", mv);
        }
        mv = new MoveAction(MoveAction.Direction.RIGHT);
        if (mv.getShortcut() != null) {
          Main.contentPane.getInputMap(
              JComponent.WHEN_IN_FOCUSED_WINDOW).put(
              mv.getShortcut().getKeyStroke(), "RIGHT");
          Main.contentPane.getActionMap().put("RIGHT", mv);
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.actions.MoveAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.