Add editing functionalities

This commit is contained in:
antograb committed 2017-12-30 00:19:41 +01:00
1 parent 81df80e7ea
commit 286023c5d8
9 files changed
+298 -16

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package ui;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
public class NewClearMazeMenuItem extends JMenuItem
implements ActionListener {
private final MazeApp mazeApp;
private NewMazeSpinnerBox spinnerBox;
public NewClearMazeMenuItem(MazeApp mazeApp) {
super("New clear maze");
this.mazeApp = mazeApp;
this.spinnerBox = new NewMazeSpinnerBox(mazeApp);
this.setAccelerator(KeyStroke.getKeyStroke("control N"));
addActionListener(this);
}
@Override
public void actionPerformed(ActionEvent arg0) {
spinnerBox.createAndShowGUI();
}
}