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);
}
}
});