File | Line |
---|
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddUnrealGoalBotDialog.java | 142 |
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/ListEnvironmentsDialog.java | 42 |
.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
clients.addCollectionListener(new CollectionEventAdaptor<EnvironmentService>() {
@Override
public void postAddEvent(
Collection<EnvironmentService> alreadyAdded,
final Collection<EnvironmentService> whereWereAdded) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Collection<SelectableEnvironment> s = SelectableEnvironment
.fromCollection(whereWereAdded);
environmentList.setModel(new DefaultComboBoxModel(s
.toArray()));
}
});
}
@Override
public void postRemoveEvent(
Collection<EnvironmentService> alreadyRemoved,
final Collection<EnvironmentService> whereWereRemoved) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Collection<SelectableEnvironment> s = SelectableEnvironment
.fromCollection(whereWereRemoved);
environmentList.setModel(new DefaultComboBoxModel(s
.toArray()));
}
});
}
});
add(environmentList); |
File | Line |
---|
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddNativeBotDialog.java | 103 |
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddUnrealGoalBotDialog.java | 113 |
setTitle("Add UnrealGoal bot");
setLayout(new FlowLayout());
add(new JLabel("Name"));
this.nameField = new JTextField();
this.nameField.setColumns(15);
add(nameField);
// Add a spinner from 1 to 7 with increments of 1
add(new JLabel("Level"));
SpinnerNumberModel levelModel = new SpinnerNumberModel(4, 1, 7, 1);
this.levelSpinner = new JSpinner(levelModel);
add(levelSpinner);
add(new JLabel("Team"));
this.teamList = new JComboBox(new String[] { "Other", "Red", "Blue" });
this.teamList.setSelectedIndex(0);
add(teamList);
location = new WaypointBox(); |