source: josm/src/org/openstreetmap/josm/actions/RedoAction.java@ 98

Last change on this file since 98 was 98, checked in by imi, 18 years ago
  • added Applet version of JOSM (unfinished)
  • fixed display bug if --no-fullscreen and --geometry was specified
File size: 726 bytes
Line 
1package org.openstreetmap.josm.actions;
2
3import java.awt.event.ActionEvent;
4import java.awt.event.InputEvent;
5import java.awt.event.KeyEvent;
6
7import javax.swing.KeyStroke;
8
9import org.openstreetmap.josm.Main;
10
11
12/**
13 * Redoes the last command.
14 *
15 * @author imi
16 */
17public class RedoAction extends JosmAction {
18
19 /**
20 * Construct the action with "Undo" as label.
21 */
22 public RedoAction() {
23 super("Redo", "redo", "Redo the last undone action.", "Ctrl-Shift-Z", KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
24 setEnabled(false);
25 }
26
27 public void actionPerformed(ActionEvent e) {
28 if (Main.map == null)
29 return;
30 Main.map.repaint();
31 Main.main.editLayer().redo();
32 }
33}
Note: See TracBrowser for help on using the repository browser.