Add my AStar for computing path. Change ID and map names in file.

This commit is contained in:
Mikael Capelle
2018-03-02 17:49:30 +01:00
parent 4017577269
commit 2e7a1c564a
12 changed files with 57 additions and 103 deletions

View File

@@ -73,8 +73,8 @@ public class GraphReaderProgressBar extends JDialog implements GraphReaderObserv
}
@Override
public void notifyStartReading(int mapId) {
setTitle(String.format("Reading graph %#x... ", mapId));
public void notifyStartReading(String mapId) {
setTitle("Reading graph " + mapId + "... ");
setVisible(true);
}

View File

@@ -278,6 +278,7 @@ public class MainWindow extends JFrame {
threadTimer.stop();
threadPanel.setVisible(false);
currentThread.setThread(null);
spPanel.setEnabled(true);
}
private void displayShortestPathSolution(ShortestPathSolution solution) {
@@ -428,8 +429,12 @@ public class MainWindow extends JFrame {
}
notifyNewGraphLoaded();
graphInfoPanel.setText(String.format("Map ID: %#x, %d nodes", graph.getMapId(),
graph.getNodes().size()));
String info = graph.getMapId();
if (graph.getMapName() != null && !graph.getMapName().isEmpty()) {
info += " - " + graph.getMapName();
}
info += ", " + graph.getNodes().size() + " nodes";
graphInfoPanel.setText(info);
drawGraph();
for (JMenuItem item: graphLockItems) {