|
@@ -157,7 +157,7 @@ public class MainWindow extends JFrame {
|
157
|
157
|
this.currentPalette = this.basicPalette;
|
158
|
158
|
|
159
|
159
|
wccPanel = new AlgorithmPanel(this, WeaklyConnectedComponentsAlgorithm.class,
|
160
|
|
- "Weakly-Connected Components", new String[] {}, false);
|
|
160
|
+ "Weakly-Connected Components", new String[]{}, false);
|
161
|
161
|
wccPanel.addStartActionListener(new ActionListener() {
|
162
|
162
|
@Override
|
163
|
163
|
public void actionPerformed(ActionEvent e) {
|
|
@@ -202,7 +202,7 @@ public class MainWindow extends JFrame {
|
202
|
202
|
});
|
203
|
203
|
|
204
|
204
|
spPanel = new AlgorithmPanel(this, ShortestPathAlgorithm.class, "Shortest-Path",
|
205
|
|
- new String[] { "Origin", "Destination" }, true);
|
|
205
|
+ new String[]{ "Origin", "Destination" }, true);
|
206
|
206
|
spPanel.addStartActionListener(new ActionListener() {
|
207
|
207
|
@Override
|
208
|
208
|
public void actionPerformed(ActionEvent e) {
|
|
@@ -254,13 +254,12 @@ public class MainWindow extends JFrame {
|
254
|
254
|
}
|
255
|
255
|
});
|
256
|
256
|
|
257
|
|
- cpPanel = new AlgorithmPanel(
|
258
|
|
- this, CarPoolingAlgorithm.class, "Car-Pooling", new String[] { "Origin Car",
|
259
|
|
- "Origin Pedestrian", "Destination Car", "Destination Pedestrian" },
|
|
257
|
+ cpPanel = new AlgorithmPanel(this, CarPoolingAlgorithm.class, "Car-Pooling", new String[]{
|
|
258
|
+ "Origin Car", "Origin Pedestrian", "Destination Car", "Destination Pedestrian" },
|
260
|
259
|
true);
|
261
|
260
|
|
262
|
261
|
psPanel = new AlgorithmPanel(this, PackageSwitchAlgorithm.class, "Car-Pooling",
|
263
|
|
- new String[] { "Oribin A", "Origin B", "Destination A", "Destination B" }, true);
|
|
262
|
+ new String[]{ "Oribin A", "Origin B", "Destination A", "Destination B" }, true);
|
264
|
263
|
|
265
|
264
|
// add algorithm panels
|
266
|
265
|
algoPanels.add(wccPanel);
|
|
@@ -580,10 +579,10 @@ public class MainWindow extends JFrame {
|
580
|
579
|
reader.addObserver(progressBar);
|
581
|
580
|
try {
|
582
|
581
|
graph = reader.read();
|
583
|
|
- System.out.flush();
|
584
|
582
|
}
|
585
|
583
|
catch (Exception exception) {
|
586
|
584
|
progressBar.setVisible(false);
|
|
585
|
+ progressBar.dispose();
|
587
|
586
|
progressBar = null;
|
588
|
587
|
JOptionPane.showMessageDialog(MainWindow.this,
|
589
|
588
|
"Unable to read graph from the selected file.");
|
|
@@ -593,6 +592,7 @@ public class MainWindow extends JFrame {
|
593
|
592
|
|
594
|
593
|
// In case of....
|
595
|
594
|
progressBar.setVisible(false);
|
|
595
|
+ progressBar.dispose();
|
596
|
596
|
progressBar = null;
|
597
|
597
|
|
598
|
598
|
String info = graph.getMapId();
|