1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package nl.tudelft.goal.ut2004.visualizer.gui.dialogs;
18
19 import java.awt.FlowLayout;
20 import java.awt.Frame;
21 import javax.swing.JButton;
22 import javax.swing.JDialog;
23 import nl.tudelft.goal.ut2004.visualizer.gui.action.ChangeMapAction;
24 import nl.tudelft.goal.ut2004.visualizer.gui.widgets.MapBox;
25 import nl.tudelft.goal.ut2004.visualizer.util.WindowPersistenceHelper;
26
27
28
29
30
31
32
33 public class ChangeMapDialog extends JDialog {
34
35
36 private MapBox mapSelection;
37 private JButton changeMap;
38
39
40
41 private WindowPersistenceHelper persistenceHelper;
42
43 public ChangeMapDialog(Frame parent) {
44 super(parent, false);
45
46 setTitle("Change Map");
47
48 this.mapSelection = new MapBox();
49 this.changeMap = new JButton("Change map");
50 this.changeMap.addActionListener(new ChangeMapAction(mapSelection));
51
52 setLayout(new FlowLayout());
53 add(mapSelection);
54 add(changeMap);
55
56 this.setSize(400, 75);
57
58 persistenceHelper = new WindowPersistenceHelper(this);
59 persistenceHelper.load();
60
61 }
62 }