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 java.awt.GridLayout;
22 import java.awt.event.ActionEvent;
23 import java.awt.event.ActionListener;
24 import java.util.Collection;
25
26 import javax.swing.JButton;
27 import javax.swing.JComboBox;
28 import javax.swing.JDialog;
29 import javax.swing.JLabel;
30 import javax.swing.JList;
31 import javax.swing.JOptionPane;
32 import javax.swing.JScrollPane;
33 import javax.swing.JSpinner;
34 import javax.swing.JTextField;
35 import javax.swing.ListSelectionModel;
36 import javax.swing.SpinnerNumberModel;
37
38 import nl.tudelft.goal.ut2004.visualizer.controller.ServerController;
39 import nl.tudelft.goal.ut2004.visualizer.gui.action.AddNativeBotAction;
40 import nl.tudelft.goal.ut2004.visualizer.gui.action.ChangeMapAction;
41 import nl.tudelft.goal.ut2004.visualizer.gui.action.SetSpeedAction;
42 import nl.tudelft.goal.ut2004.visualizer.gui.widgets.MapBox;
43 import nl.tudelft.goal.ut2004.visualizer.gui.widgets.WaypointBox;
44 import nl.tudelft.goal.ut2004.visualizer.util.SelectableWayPoint;
45
46 import cz.cuni.amis.pogamut.base3d.worldview.object.Location;
47 import cz.cuni.amis.pogamut.unreal.communication.worldview.map.IUnrealWaypoint;
48 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.AddBot;
49 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint;
50 import cz.cuni.amis.pogamut.ut2004.communication.worldview.map.Waypoint;
51 import cz.cuni.amis.pogamut.ut2004.server.IUT2004Server;
52 import cz.cuni.amis.utils.exception.PogamutException;
53
54
55
56
57
58
59
60 public class ChangeMapDialog extends JDialog {
61
62
63 private MapBox mapSelection;
64 private JButton changeMap;
65
66 public ChangeMapDialog(Frame parent) {
67 super(parent, false);
68
69 setTitle("Change Map");
70
71 this.mapSelection = new MapBox();
72 this.changeMap = new JButton("Change map");
73 this.changeMap.addActionListener(new ChangeMapAction(mapSelection));
74
75 setLayout(new FlowLayout());
76 add(mapSelection);
77 add(changeMap);
78
79 this.setSize(400, 75);
80
81 }
82 }